3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('red', 'blue', 'green', 'octarine'); $array2 = array('red', 'yellow', 'green'); $diff = array_diff($array1, $array2); print_r($diff); //Array ( [1] => blue [3] => octarine ) print_r(array_merge($diff)) //Array ( [0] => blue [1] => octarine )
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected end of file in /in/FB7i0 on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/FB7i0 on line 7
Process exited with code 255.

preferences:
182.5 ms | 1395 KiB | 55 Q