3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ protected $data = ['lol' => 'baz']; function __get($x){ return $this->data[$x]; } function getStuff(){ return $this->lol; } } $x = new A; var_dump($x->getStuff());

preferences:
25.42 ms | 404 KiB | 5 Q