3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { protected $foo = 'Base'; } class Other extends Base { public function __construct() { $this->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:
154.22 ms | 2132 KiB | 8 Q