3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { static $someFunction; // Throws error. static function foo() { (static::$someFunction)(); } // Works static function bar() { $func = static::$someFunction; $func(); } } A::$someFunction = function() { print "wtf\n";}; A::bar(); A::foo();
based on 0SPfW
Output for 7.0.0 - 7.2.0
wtf wtf
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/WtPdm on line 8
Process exited with code 255.