3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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/j8GIf on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/j8GIf on line 7
Process exited with code 255.