3v4l.org

run code in 300+ PHP versions simultaneously
<?php class example{ /*Member variables*/ protected $a; public $c = array(); protected $b = array(); public function &__get($name) { return $this->$name; } public function __set($name, $value) { $this->$name = $value; } } $fun = new example(); $x = $fun->c; $x[] = 42; var_dump($fun->c);

preferences:
37.62 ms | 402 KiB | 5 Q