Skip to content

Drop support for -z CLI/CGI option #17883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 7 additions & 3 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,13 @@ PHP 8.5 UPGRADE NOTES
========================================

- Core:
The high resolution timer (`hrtime()`) on macOS now uses the recommended
`clock_gettime_nsec_np(CLOCK_UPTIME_RAW)` API instead of
`mach_absolute_time()`.
. The high resolution timer (`hrtime()`) on macOS now uses the recommended
`clock_gettime_nsec_np(CLOCK_UPTIME_RAW)` API instead of
`mach_absolute_time()`.

- CLI/CGI:
. The `-z` or `--zend-extension` option has been removed as it was
non-functional. Use `-d zend_extension=<path>` instead.

========================================
14. Performance Improvements
Expand Down
6 changes: 0 additions & 6 deletions sapi/cgi/cgi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ static const opt_struct OPTIONS[] = {
{'w', 0, "strip"},
{'?', 0, "usage"},/* help alias (both '?' and 'usage') */
{'v', 0, "version"},
{'z', 1, "zend-extension"},
{'T', 1, "timing"},
{'-', 0, NULL} /* end of args */
};
Expand Down Expand Up @@ -1042,7 +1041,6 @@ static void php_cgi_usage(char *argv0)
" -s Display colour syntax highlighted source.\n"
" -v Version number\n"
" -w Display source with stripped comments and whitespace.\n"
" -z <file> Load Zend extension <file>.\n"
" -T <count> Measure execution time of script repeated <count> times.\n",
prog, prog);
}
Expand Down Expand Up @@ -2383,10 +2381,6 @@ consult the installation file that came with this distribution, or visit \n\
behavior = PHP_MODE_STRIP;
break;

case 'z': /* load extension file */
zend_load_extension(php_optarg);
break;

default:
break;
}
Expand Down
7 changes: 0 additions & 7 deletions sapi/cli/php.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,6 @@ Version number
.PD 1
.B \-w
Output source with stripped comments and whitespace
.TP
.PD 0
.B \-\-zend\-extension \fIfile\fP
.TP
.PD 1
.B \-z \fIfile\fP
Load Zend extension
.IR file
.TP
.IR args.\|.\|.
Expand Down
5 changes: 0 additions & 5 deletions sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ const opt_struct OPTIONS[] = {
{'w', 0, "strip"},
{'?', 0, "usage"},/* help alias (both '?' and 'usage') */
{'v', 0, "version"},
{'z', 1, "zend-extension"},
{10, 1, "rf"},
{10, 1, "rfunction"},
{11, 1, "rc"},
Expand Down Expand Up @@ -496,7 +495,6 @@ static void php_cli_usage(char *argv0)
" -s Output HTML syntax highlighted source.\n"
" -v Version number\n"
" -w Output source with stripped comments and whitespace.\n"
" -z <file> Load Zend extension <file>.\n"
"\n"
" args... Arguments passed to script. Use -- args when first argument\n"
" starts with - or script is read from stdin\n"
Expand Down Expand Up @@ -800,9 +798,6 @@ static int do_cli(int argc, char **argv) /* {{{ */
context.mode = PHP_CLI_MODE_STRIP;
break;

case 'z': /* load extension file */
zend_load_extension(php_optarg);
break;
case 'H':
hide_argv = true;
break;
Expand Down
Loading