3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function thing(array $needle, $haystack) { $haystack = array($haystack); foreach ($needle as $a) { $target = []; foreach ($haystack as $h) { $target = array_merge($target, explode($a, $h)); } $haystack = $target; } $haystack = ; return $array_filter($haystack) + $needle; } var_dump(thing(array('THIS', 'test', 'hello', 'A', 'is'), 'helloTHISisAblindtest'));
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected ';' in /in/Lt5JM on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/Lt5JM on line 8
Process exited with code 255.