mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
060df83a98
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
12 lines
228 B
PHP
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
|