[php-src] master: Merge branch 'PHP-8.5'

From: Date: Sat, 19 Sep 2026 16:01:26 +0000
Subject: [php-src] master: Merge branch 'PHP-8.5'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141282@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-09-19T17:01:03+01:00 Commit: https://github.com/php/php-src/commit/a3fb5ecea9a8642372d88bafc5d38c8d082d2469 Raw diff: https://github.com/php/php-src/commit/a3fb5ecea9a8642372d88bafc5d38c8d082d2469.diff Merge branch 'PHP-8.5' Changed paths: A Zend/tests/gh23662.phpt M NEWS M Zend/zend.c M sapi/cli/php_cli.c Diff: diff --git a/NEWS b/NEWS index 25513e040f0c..fdb9a6128725 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,11 @@ PHP NEWS . Fix handling of references to typed properties during unserialization of various internal classes. (ndossche, timwolla) . Fixed OSS-Fuzz 532353396 (assertion failure with static type). (Girgias) + . Fix GH-23662 (Avoid NAN warning in print_r()). (CodedByManish) + +- CLI + . Fix GH-22567 (Windows ZTS CLI SAPI should refresh its TSRMLS cache during + request activation). (matyhtf) - Date: . Fix unserialization of Time\Duration. (timwolla) diff --git a/Zend/tests/gh23662.phpt b/Zend/tests/gh23662.phpt new file mode 100644 index 000000000000..426b6e2aa5d7 --- /dev/null +++ b/Zend/tests/gh23662.phpt @@ -0,0 +1,12 @@ +--TEST-- +GH-23662 (print_r() results in warning for NAN) +--FILE-- +<?php +print_r(NAN); +print_r([NAN]); +?> +--EXPECT-- +NANArray +( + [0] => NAN +) diff --git a/Zend/zend.c b/Zend/zend.c index 42e6fb568a22..3cfc0ffd2512 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -602,6 +602,9 @@ static void zend_print_zval_r_to_buf(smart_str *buf, zval *expr, int indent) /* case IS_LONG: smart_str_append_long(buf, Z_LVAL_P(expr)); break; + case IS_DOUBLE: + smart_str_append_double(buf, Z_DVAL_P(expr), EG(precision), false); + break; case IS_REFERENCE: zend_print_zval_r_to_buf(buf, Z_REFVAL_P(expr), indent); break; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 296b7cd521ff..9cd1f5a8c158 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -338,6 +338,15 @@ static void sapi_cli_log_message(const char *message, int syslog_type_int) /* {{ } /* }}} */ +static int sapi_cli_activate(void) /* {{{ */ +{ +#if defined(PHP_WIN32) && defined(ZTS) + ZEND_TSRMLS_CACHE_UPDATE(); +#endif + return SUCCESS; +} +/* }}} */ + static int sapi_cli_deactivate(void) /* {{{ */ { fflush(stdout); @@ -402,7 +411,7 @@ static sapi_module_struct cli_sapi_module = { php_cli_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ - NULL, /* activate */ + sapi_cli_activate, /* activate */ sapi_cli_deactivate, /* deactivate */ sapi_cli_ub_write, /* unbuffered write */

« previous php.cvs (#141282) next »