Skip to content

The help document of php misses two options #9670

Open

Description

@ccccmd

The "-h" option of php misses the option "C", "q".

  • For the option "C", the following code appears during option parsing in sapi/cli/php_cli.c:701-703 for version 8.0.23.
			case 'C': /* don't chdir to the script directory */
				/* This is default so NOP */
				break;
  • For the option "q", the following code appears during option parsing in sapi/cli/php_cli.c:737-739 for version 8.0.23.
			case 'q': /* do not generate HTTP headers */
				/* This is default so NOP */
				break;

Although it has no actual function, it is still possible forget to modify the help document after adding the function in a subsequent update.

But they do not appear in the document provided by "-h".

It may prevent users from using the relevant function.

Activity

  1. cmb69 commented on Oct 4, 2022

    @cmb69
    Member

    Right, but again this is a php-src issue (the options are already documented in the PHP manual). And while I agree that these options should be listed by php -h, we should consider to remove them from the CLI API.

  2. transferred this issue fromphp/doc-enon Oct 4, 2022
  3. Truta446 commented on Oct 27, 2026

    @Truta446

    I opened #24790 adding -C and -q to php -h, marked as no-ops in CLI. It doesn't remove them, since that would be a BC change; if removal is the preferred direction, I can close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions