3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Parent { public static $prop; } class Child extends Parent { } Parent::prop = "first"; $parent = new Parent; echo "parent 1: " . $parent::prop; Child::prop = "second"; $child = new Child; echo "child 1: " . $child::prop; echo "parent 2: " . $parent::prop;
Output for 5.3.0 - 5.5.12
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/o2Ofl on line 3
Process exited with code 255.