Commit 23f4b935236 for php.net
commit 23f4b935236e0b811e85f2c8876c04a538ce0c0c
Author: Giovanni Giacobbi <giovanni@giacobbi.net>
Date: Thu Jan 29 11:58:12 2026 +0100
gen_stub: Fix compatibility with php 7.4 (in PHP-8.4) (#21076)
diff --git a/build/gen_stub.php b/build/gen_stub.php
index 58b846d2cb5..28b168c7264 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -84,7 +84,7 @@ function processStubFile(string $stubFile, Context $context, bool $includeOnly =
}
/* Because exit() and die() are proper token/keywords we need to hack-around */
- $hasSpecialExitAsFunctionHandling = str_ends_with($stubFile, 'zend_builtin_functions.stub.php');
+ $hasSpecialExitAsFunctionHandling = basename($stubFile) == 'zend_builtin_functions.stub.php';
if (!$fileInfo = $context->parsedFiles[$stubFile] ?? null) {
initPhpParser();
$stubContent = $stubCode ?? file_get_contents($stubFile);