3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('one','two'); $b=array('three','four','five'); //not a union of arrays' values echo '$a + $b : '; print_r ($a + $b); //a union of arrays' values echo "array_unique(array_merge($a,$b)):"; // cribbed from http://oreilly.com/catalog/progphp/chapter/ch05.html print_r (array_unique(array_merge($a,$b)));
Output for 5.4.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
$a + $b : Array ( [0] => one [1] => two [2] => five ) Notice: Array to string conversion in /in/SnRgj on line 10 Notice: Array to string conversion in /in/SnRgj on line 10 array_unique(array_merge(Array,Array)):Array ( [0] => one [1] => two [2] => three [3] => four [4] => five )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.3.29
$a + $b : Array ( [0] => one [1] => two [2] => five ) array_unique(array_merge(Array,Array)):Array ( [0] => one [1] => two [2] => three [3] => four [4] => five )