3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new Obj; $obj->oele['boele'][] = 'foo'; print_r($obj); var_dump($obj->bar); class Obj { function __construct() { $this->foo = 'bar'; } function &__get($name) { $this->$name = null; $var = &$this->$name; switch ( $name ) { case 'bar': $var = 'foo'; break; } return $this->$name; } }

preferences:
36.5 ms | 402 KiB | 5 Q