mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

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.
16 lines
197 B
PHP
16 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)
|