3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { protected $test; function __construct() { $test = 999; } } class B extends A { } class C extends B { function Myfunction() { echo 'VAL: ' . $test; } } $obj = new C; $obj->Myfunction(); } ?>
Output for 5.3.0 - 5.4.19
Parse error: syntax error, unexpected '}' in /in/3jOoA on line 22
Process exited with code 255.