Skip to content

Commit 8ef28f6

Browse files
committed
Fix parse error
1 parent bc90409 commit 8ef28f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

extractor/extract.php

+9
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,15 @@ public function clear(): void
251251
if ($stubContents === false) {
252252
throw new \LogicException('Could not read stub');
253253
}
254+
if (str_ends_with($stubPath, '/Zend/zend_builtin_functions.stub.php')) {
255+
$stubContents = str_replace([
256+
'function exit',
257+
'function die',
258+
], [
259+
'function _exit',
260+
'function _die',
261+
], $stubContents);
262+
}
254263
$ast = $this->parser->parse($stubContents);
255264
if ($ast === null) {
256265
throw new \LogicException('AST cannot be null');

0 commit comments

Comments
 (0)