diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 6894f57c12c0..6dcc07a0c0b6 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -484,6 +484,7 @@ static void php_cli_usage(char *argv0) "\n" " -a Run as interactive shell (requires readline extension)\n" " -c | Look for php.ini file in this directory\n" + " -C Do not chdir to the script's directory (no-op in CLI)\n" " -n No configuration (ini) files will be used\n" " -d foo[=bar] Define INI entry foo with value 'bar'\n" " -e Generate extended information for debugger/profiler\n" @@ -492,6 +493,7 @@ static void php_cli_usage(char *argv0) " -i PHP information\n" " -l Syntax check only (lint)\n" " -m Show compiled in modules\n" + " -q Do not output HTTP headers (no-op in CLI)\n" " -r Run PHP without using script tags \n" " -B Run PHP before processing input lines\n" " -R Run PHP for every input line\n" diff --git a/sapi/cli/tests/gh9670.phpt b/sapi/cli/tests/gh9670.phpt new file mode 100644 index 000000000000..2df588db372c --- /dev/null +++ b/sapi/cli/tests/gh9670.phpt @@ -0,0 +1,21 @@ +--TEST-- +GH-9670 (php -h does not list the -C and -q options) +--SKIPIF-- + +--FILE-- + +--EXPECT-- + -C Do not chdir to the script's directory (no-op in CLI) + -q Do not output HTTP headers (no-op in CLI)