3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class OtherClass extends MyClass { public static $my_static = 'static var'; public static function doubleColon() { echo parent::CONST_VALUE . "\n"; echo self::$my_static . "\n"; } } $classname = 'OtherClass'; echo $classname::doubleColon(); // As of PHP 5.3.0 OtherClass::doubleColon();
Output for 7.0.0 - 7.2.0
Fatal error: Class 'MyClass' not found in /in/ri9ql on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Class 'MyClass' not found in /in/ri9ql on line 4
Process exited with code 255.