3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myArray = [9314802498, 9314801890, 'MOSWAPELE ESTHER', 'BENNETH']; $myArray = array_merge(array_filter($myArray, function($key) {return $key % 2 == 0}, ARRAY_FILTER_USE_KEY), array_filter($myArray, function($key) {return $key % 2 == 1}, ARRAY_FILTER_USE_KEY)); var_dump($myArray);
based on DXRoJ
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '}', expecting ';' in /in/8dDTU on line 5
Process exited with code 255.
Output for 5.4.11 - 5.6.17
Parse error: syntax error, unexpected '}' in /in/8dDTU on line 5
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/8dDTU on line 3
Process exited with code 255.