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

From: Date: Sun, 01 Nov 2026 16:30:29 +0000
Subject: [php-src] master: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143168@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-11-01T17:30:08+01:00 Commit: https://github.com/php/php-src/commit/3f06ea000209a95a3d0736c4585aeeeed8a6c052 Raw diff: https://github.com/php/php-src/commit/3f06ea000209a95a3d0736c4585aeeeed8a6c052.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: Fix opcache phar check Changed paths: M NEWS M ext/opcache/ZendAccelerator.c M ext/opcache/tests/issue0149.phpt Diff: diff --git a/NEWS b/NEWS index d7dc0e39c3ac..1e633eb223fd 100644 --- a/NEWS +++ b/NEWS @@ -139,6 +139,7 @@ PHP NEWS (Jorg Sowa) . Fixed bug GH-24988 (Incorrect opcode range check causes bugs with exceptions in function JIT). (ndossche, Jorg Sowa) + . Fix opcache phar check. (ndossche) - OpenSSL: . Fixed build with OpenSSL 4.1. (Weilin Du) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 41421b2d499c..9330a85a6ea2 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -1541,10 +1541,10 @@ static void zend_accel_add_key(zend_string *key, zend_accel_hash_entry *bucket) } } +/* Must perform the same check as phar_compile_file(). */ static zend_always_inline bool is_phar_file(const zend_string *filename) { - return filename && - zend_string_ends_with_literal(filename, ".phar") && + return filename && strstr(ZSTR_VAL(filename), ".phar") && !strstr(ZSTR_VAL(filename), "://"); } diff --git a/ext/opcache/tests/issue0149.phpt b/ext/opcache/tests/issue0149.phpt index 29e6f02808a7..20fe7636ff08 100644 --- a/ext/opcache/tests/issue0149.phpt +++ b/ext/opcache/tests/issue0149.phpt @@ -22,7 +22,7 @@ unset($p); include "php_cli_server.inc"; -$ini = '-d opcache.enable=1 -d opcache.enable_cli=1'; +$ini = '-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.file_update_protection=0'; if (file_exists(ini_get('extension_dir').'/phar.'.PHP_SHLIB_SUFFIX)) { $ini .= ' -d extension=phar.'.PHP_SHLIB_SUFFIX; }

« previous php.cvs (#143168) next »