Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ static void php_cli_usage(char *argv0)
"\n"
" -a Run as interactive shell (requires readline extension)\n"
" -c <path>|<file> 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"
Expand All @@ -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 <code> Run PHP <code> without using script tags <?..?>\n"
" -B <begin_code> Run PHP <begin_code> before processing input lines\n"
" -R <code> Run PHP <code> for every input line\n"
Expand Down
21 changes: 21 additions & 0 deletions sapi/cli/tests/gh9670.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--TEST--
GH-9670 (php -h does not list the -C and -q options)
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php

$php = getenv('TEST_PHP_EXECUTABLE_ESCAPED');

foreach (explode("\n", `$php -n -h`) as $line) {
if (preg_match('/^ -[Cq] /', $line)) {
echo $line, "\n";
}
}

?>
--EXPECT--
-C Do not chdir to the script's directory (no-op in CLI)
-q Do not output HTTP headers (no-op in CLI)
Loading