php-src/Zend/tests/oss_fuzz_60441.phpt
Ilija Tovilo 060df83a98
Fix double-compilation of arrow-function
We transform the arrow function by nesting the expression into a return
statement. If we compile the arrow function twice this would be done twice,
leading to a compile assertion.

Fix oss-fuzz #60411
Closes GH-11632
2023-07-12 11:01:23 +02:00

12 lines
228 B
PHP

--TEST--
oss-fuzz #60441 (Double compilation of arrow function)
--FILE--
<?php
assert(fn()=>y)[y]??=y;
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant "y" in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d