Skip to content

Commit 98e0501

Browse files
committed
Drop support for -z CLI/CGI option
This functionality didn't actually work. This was discussed on the mailing list [1] and no one objected. [1] https://externals.io/message/126368 Closes phpGH-17883.
1 parent 1ae2c87 commit 98e0501

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PHP NEWS
55
- CLI:
66
. Extended --ini to print INI settings changed from the builtin default.
77
(timwolla)
8+
. Drop support for -z CLI/CGI flag. (nielsdos)
89

910
- COM:
1011
. Fixed property access of PHP objects wrapped in variant. (cmb)

UPGRADING

+7-3
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,13 @@ PHP 8.5 UPGRADE NOTES
362362
========================================
363363

364364
- Core:
365-
The high resolution timer (`hrtime()`) on macOS now uses the recommended
366-
`clock_gettime_nsec_np(CLOCK_UPTIME_RAW)` API instead of
367-
`mach_absolute_time()`.
365+
. The high resolution timer (`hrtime()`) on macOS now uses the recommended
366+
`clock_gettime_nsec_np(CLOCK_UPTIME_RAW)` API instead of
367+
`mach_absolute_time()`.
368+
369+
- CLI/CGI:
370+
. The `-z` or `--zend-extension` option has been removed as it was
371+
non-functional. Use `-d zend_extension=<path>` instead.
368372

369373
========================================
370374
14. Performance Improvements

sapi/cgi/cgi_main.c

-6
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ static const opt_struct OPTIONS[] = {
158158
{'w', 0, "strip"},
159159
{'?', 0, "usage"},/* help alias (both '?' and 'usage') */
160160
{'v', 0, "version"},
161-
{'z', 1, "zend-extension"},
162161
{'T', 1, "timing"},
163162
{'-', 0, NULL} /* end of args */
164163
};
@@ -1042,7 +1041,6 @@ static void php_cgi_usage(char *argv0)
10421041
" -s Display colour syntax highlighted source.\n"
10431042
" -v Version number\n"
10441043
" -w Display source with stripped comments and whitespace.\n"
1045-
" -z <file> Load Zend extension <file>.\n"
10461044
" -T <count> Measure execution time of script repeated <count> times.\n",
10471045
prog, prog);
10481046
}
@@ -2383,10 +2381,6 @@ consult the installation file that came with this distribution, or visit \n\
23832381
behavior = PHP_MODE_STRIP;
23842382
break;
23852383

2386-
case 'z': /* load extension file */
2387-
zend_load_extension(php_optarg);
2388-
break;
2389-
23902384
default:
23912385
break;
23922386
}

sapi/cli/php.1.in

-7
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,6 @@ Version number
303303
.PD 1
304304
.B \-w
305305
Output source with stripped comments and whitespace
306-
.TP
307-
.PD 0
308-
.B \-\-zend\-extension \fIfile\fP
309-
.TP
310-
.PD 1
311-
.B \-z \fIfile\fP
312-
Load Zend extension
313306
.IR file
314307
.TP
315308
.IR args.\|.\|.

sapi/cli/php_cli.c

-5
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ const opt_struct OPTIONS[] = {
148148
{'w', 0, "strip"},
149149
{'?', 0, "usage"},/* help alias (both '?' and 'usage') */
150150
{'v', 0, "version"},
151-
{'z', 1, "zend-extension"},
152151
{10, 1, "rf"},
153152
{10, 1, "rfunction"},
154153
{11, 1, "rc"},
@@ -496,7 +495,6 @@ static void php_cli_usage(char *argv0)
496495
" -s Output HTML syntax highlighted source.\n"
497496
" -v Version number\n"
498497
" -w Output source with stripped comments and whitespace.\n"
499-
" -z <file> Load Zend extension <file>.\n"
500498
"\n"
501499
" args... Arguments passed to script. Use -- args when first argument\n"
502500
" starts with - or script is read from stdin\n"
@@ -800,9 +798,6 @@ static int do_cli(int argc, char **argv) /* {{{ */
800798
context.mode = PHP_CLI_MODE_STRIP;
801799
break;
802800

803-
case 'z': /* load extension file */
804-
zend_load_extension(php_optarg);
805-
break;
806801
case 'H':
807802
hide_argv = true;
808803
break;

0 commit comments

Comments
 (0)