php-src/Zend/tests/array_addition_not_commutative.phpt
Nikita Popov 7dc5bc5063 Do not swap operands in array addition
As we support constant array operands nowadays, the original check
didn't work anymore.
2015-12-14 00:29:05 +01:00

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)
}