Skip to content

Commit 23f4b93

Browse files
authored
gen_stub: Fix compatibility with php 7.4 (in PHP-8.4) (php#21076)
1 parent 371422b commit 23f4b93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build/gen_stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function processStubFile(string $stubFile, Context $context, bool $includeOnly =
8484
}
8585

8686
/* Because exit() and die() are proper token/keywords we need to hack-around */
87-
$hasSpecialExitAsFunctionHandling = str_ends_with($stubFile, 'zend_builtin_functions.stub.php');
87+
$hasSpecialExitAsFunctionHandling = basename($stubFile) == 'zend_builtin_functions.stub.php';
8888
if (!$fileInfo = $context->parsedFiles[$stubFile] ?? null) {
8989
initPhpParser();
9090
$stubContent = $stubCode ?? file_get_contents($stubFile);

0 commit comments

Comments
 (0)