3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { protected $foo = 'Base'; } class Other extends Base { protected $foo = 'Other'; } class Child extends Base { public function bar() { $otherBase = new Other(); echo $otherBase->foo; } } $child = new Child(); $child->bar();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.34 ms | 2380 KiB | 10 Q