mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
e304468e57
If the RHS has INDIRECT elements, we do not those to be added to the LHS verbatim. As we're using UPDATE_INDIRECT, we might even create a nested INDIRECT that way. This is a side-quest of oss-fuzz #26245.
17 lines
197 B
PHP
17 lines
197 B
PHP
--TEST--
|
|
Array addition should not add INDIRECT elements
|
|
--FILE--
|
|
<?php
|
|
|
|
$x = 1;
|
|
$ary = ['y' => 1];
|
|
$ary += $GLOBALS;
|
|
var_dump($ary['x']);
|
|
$x = 2;
|
|
var_dump($ary['x']);
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(1)
|