mirror of
https://github.com/php/php-src.git
synced 2024-12-12 03:15:29 +08:00
9659562cb5
We should addref CONST operands during memoization, as they might be destroyed by later compilation, e.g. through interning.
13 lines
204 B
PHP
13 lines
204 B
PHP
--TEST--
|
|
Null coalesce assign with memoized constant operand that is later interned (OSS-Fuzz #17903)
|
|
--FILE--
|
|
<?php
|
|
$foo[__DIR__] ??= 42;
|
|
var_dump($foo);
|
|
?>
|
|
--EXPECTF--
|
|
array(1) {
|
|
["%s"]=>
|
|
int(42)
|
|
}
|