3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait Bar { public static function dump() { var_dump( '__CLASS__: ' . __CLASS__, 'self::class: ' . self::class, 'static::class: ' . static::class, 'self::foo(): ' . self::foo()); } } class Foo { use Bar; public static $foo = __CLASS__; public static function foo() { return __CLASS__; } } Foo::dump();
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/809Ul on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/809Ul on line 3
Process exited with code 255.