3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(array_filter(array('foo' => 42, 'bar' => 50), function ($val) { return $val == 50 })); var_dump(array_map(function ($val) { return $val*2; }, array('foo' => 84, 'bar' => 25)));
Output for 7.0.0
Parse error: syntax error, unexpected '}', expecting ';' in /in/lmP1X on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/lmP1X on line 3
Process exited with code 255.