3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private static $test; public static function hasTest() { return !!static::$test; } public static function setTest($test) { static::$test = $test; } } class FooExtension extend Foo { } class_alias('FooExtension', 'FooAlias'); FooExtension::setTest('derp'); var_dump(FooAlias::hasTest());
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0 - 7.0.1
Parse error: syntax error, unexpected 'extend' (T_STRING), expecting '{' in /in/iGOoK on line 20
Process exited with code 255.

preferences:
167.21 ms | 1395 KiB | 25 Q