Skip to content
Merged
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
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PHP NEWS
- CLI:
. Extended --ini to print INI settings changed from the builtin default.
(timwolla)
. Drop support for -z CLI/CGI flag. (nielsdos)

- COM:
. Fixed property access of PHP objects wrapped in variant. (cmb)
Expand Down
10 changes: 7 additions & 3 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,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
16 changes: 12 additions & 4 deletions ext/zend_test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,15 @@ void * zend_test_custom_realloc(void * ptr, size_t len ZEND_FILE_LINE_DC ZEND_FI
return _zend_mm_realloc(ZT_G(zend_orig_heap), ptr, len ZEND_FILE_LINE_EMPTY_CC ZEND_FILE_LINE_EMPTY_CC);
}

static void zend_test_reset_heap(zend_zend_test_globals *zend_test_globals)
{
if (zend_test_globals->zend_test_heap) {
free(zend_test_globals->zend_test_heap);
zend_test_globals->zend_test_heap = NULL;
zend_mm_set_heap(zend_test_globals->zend_orig_heap);
}
}

static PHP_INI_MH(OnUpdateZendTestObserveOplineInZendMM)
{
if (new_value == NULL) {
Expand All @@ -718,10 +727,8 @@ static PHP_INI_MH(OnUpdateZendTestObserveOplineInZendMM)
);
ZT_G(zend_orig_heap) = zend_mm_get_heap();
zend_mm_set_heap(ZT_G(zend_test_heap));
} else if (ZT_G(zend_test_heap)) {
free(ZT_G(zend_test_heap));
ZT_G(zend_test_heap) = NULL;
zend_mm_set_heap(ZT_G(zend_orig_heap));
} else {
zend_test_reset_heap(ZEND_MODULE_GLOBALS_BULK(zend_test));
}
return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
}
Expand Down Expand Up @@ -1387,6 +1394,7 @@ static PHP_GINIT_FUNCTION(zend_test)
static PHP_GSHUTDOWN_FUNCTION(zend_test)
{
zend_test_observer_gshutdown(zend_test_globals);
zend_test_reset_heap(zend_test_globals);
}

PHP_MINFO_FUNCTION(zend_test)
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