3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $c = function(){echo "closure time!\n";}; class myClass{} $obj = new myClass; $c->call($obj); $obj2 = new stdClass; $c->call($obj2);
based on aWiHc
Output for 7.0.0 - 7.2.0
closure time! Warning: Cannot bind closure to scope of internal class stdClass in /in/Kcgdn on line 9
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/Kcgdn on line 6
Process exited with code 255.