3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $protected1 = 'protected1'; public function test1() { var_dump($this->protected1); var_dump($this->protected2); } } class Bar extends Foo { protected $protected2 = 'protected2'; public function test2() { var_dump($this->protected1); var_dump($this->protected2); } } (new Bar)->test1(); (new Bar)->test2();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
166.92 ms | 2567 KiB | 11 Q