File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ PHP NEWS
4141- CLI:
4242 . Fixed bug GH-24697 (PHP_HTTP_PARSER_STRICT build option doesn't work).
4343 (ndossche, devnexen)
44+ . Fixed bug GH-9670 (List -C and -q in the CLI help). (Juan Versolato Lopes)
4445
4546- Curl:
4647 . Fix use-after-free of CURLOPT_STDERR stream on cloned curl handle.
Original file line number Diff line number Diff line change @@ -484,6 +484,7 @@ static void php_cli_usage(char *argv0)
484484 "\n"
485485 " -a Run as interactive shell (requires readline extension)\n"
486486 " -c <path>|<file> Look for php.ini file in this directory\n"
487+ " -C Do not chdir to the script's directory (no-op in CLI)\n"
487488 " -n No configuration (ini) files will be used\n"
488489 " -d foo[=bar] Define INI entry foo with value 'bar'\n"
489490 " -e Generate extended information for debugger/profiler\n"
@@ -492,6 +493,7 @@ static void php_cli_usage(char *argv0)
492493 " -i PHP information\n"
493494 " -l Syntax check only (lint)\n"
494495 " -m Show compiled in modules\n"
496+ " -q Do not output HTTP headers (no-op in CLI)\n"
495497 " -r <code> Run PHP <code> without using script tags <?..?>\n"
496498 " -B <begin_code> Run PHP <begin_code> before processing input lines\n"
497499 " -R <code> Run PHP <code> for every input line\n"
Original file line number Diff line number Diff line change 1+ --TEST--
2+ GH-9670 (php -h does not list the -C and -q options)
3+ --SKIPIF--
4+ <?php
5+ include "skipif.inc " ;
6+ ?>
7+ --FILE--
8+ <?php
9+
10+ $ php = getenv ('TEST_PHP_EXECUTABLE_ESCAPED ' );
11+
12+ foreach (explode ("\n" , `$ php -n -h `) as $ line ) {
13+ if (preg_match ('/^ -[Cq] / ' , $ line )) {
14+ echo $ line , "\n" ;
15+ }
16+ }
17+
18+ ?>
19+ --EXPECT--
20+ -C Do not chdir to the script's directory (no-op in CLI)
21+ -q Do not output HTTP headers (no-op in CLI)
You can’t perform that action at this time.
0 commit comments