3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = null; $a->__invoke = function(){echo 'A object called';}; echo $a(); function x(){ return function(){ return 'something big'; }; } $w = x(); echo $w->__invoke();
based on 1cSlO
Output for 7.0.0 - 7.2.0
Warning: Creating default object from empty value in /in/MK9Kb on line 4 Fatal error: Uncaught Error: Function name must be a string in /in/MK9Kb:6 Stack trace: #0 {main} thrown in /in/MK9Kb on line 6
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Warning: Creating default object from empty value in /in/MK9Kb on line 4 Fatal error: Function name must be a string in /in/MK9Kb on line 6
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Strict Standards: Creating default object from empty value in /in/MK9Kb on line 4 Fatal error: Function name must be a string in /in/MK9Kb on line 6
Process exited with code 255.