mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
7dc5bc5063
As we support constant array operands nowadays, the original check didn't work anymore.
20 lines
229 B
PHP
20 lines
229 B
PHP
--TEST--
|
|
Array addition is not commutative -- do not swap operands
|
|
--FILE--
|
|
<?php
|
|
|
|
$array = [1, 2, 3];
|
|
$array = [4, 5, 6] + $array;
|
|
var_dump($array);
|
|
|
|
?>
|
|
--EXPECT--
|
|
array(3) {
|
|
[0]=>
|
|
int(4)
|
|
[1]=>
|
|
int(5)
|
|
[2]=>
|
|
int(6)
|
|
}
|