summaryrefslogtreecommitdiff
path: root/Zend/tests/array_addition_not_commutative.phpt
blob: f4e534231e1e73eca1f5177df27dc6dee7339964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--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)
}