3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Parent { publis static function get() { return new self(); } } class Child extends Parent {} var_dump(get_class_name(Parent::get())); var_dump(get_class_name(Child::get()));
Output for 5.3.0 - 5.3.26, 5.4.0 - 5.4.16
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/Llhtc on line 3
Process exited with code 255.

preferences:
182.89 ms | 1395 KiB | 51 Q