3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a' => 'one', 'b' => 'two'); $b=array('a' => 'three', 'b' => 'four', 'c' => '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)));

preferences:
43.16 ms | 402 KiB | 5 Q