3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = function($b) { print "$b\n"; }; $a('lulz'); $b['lulz'] = function($b) { print "$b\n"; }; $b['lulz']('more lulz'); $c = new stdclass(); $c->func = function($b) { print "$b\n"; }; $c->func('hahaha nope'); class D { public $func; } $d = new D(); $d->func = function($b) { print "$b\n"; }; $d->func('asdf);
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ''asdf);' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /in/RWVMc on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /in/RWVMc on line 18
Process exited with code 255.