3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function addShit() { $a = []; $a[] = (function() { return 'poop'; })(); return $a; } var_dump(addShit());
based on mTOrY
Output for hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0rc3
array(1) { [0]=> string(4) "poop" }
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/W0XAe on line 8
Process exited with code 255.