3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public static function foo() { $f = function() { echo get_called_class()."\n"; echo static::$bar."\n"; }; $f(); echo get_called_class()."\n"; echo static::$bar."\n"; } } class B extends A { static public $bar = 'ss'; } B::foo(); echo get_called_class():"\n";
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected ':', expecting ',' or ';' in /in/SVtLr on line 21
Process exited with code 255.