Commit 3f06ea00020 for php
commit 3f06ea000209a95a3d0736c4585aeeeed8a6c052
Merge: 96cbae8f88e 9ea04a23aaf
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date: Sun Nov 1 17:30:08 2026 +0100
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
Fix opcache phar check
diff --cc NEWS
index d7dc0e39c3a,2248d6a292e..1e633eb223f
--- a/NEWS
+++ b/NEWS
@@@ -139,9 -205,9 +139,10 @@@ PH
(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)
. Fixed bug GH-24784 (openssl_pkcs7_read() and openssl_cms_read() overwrite
certificates with CRLs). (Alexander Danilov)
diff --cc ext/opcache/ZendAccelerator.c
index 41421b2d499,c1248404270..9330a85a6ea
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@@ -1541,10 -1524,10 +1541,10 @@@ static void zend_accel_add_key(zend_str
}
}
+ /* Must perform the same check as phar_compile_file(). */
-static zend_always_inline bool is_phar_file(zend_string *filename)
+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), "://");
}