3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Magic { public $a = "A"; protected $b = array("a"=>"A", "b"=>"B", "c"=>"C"); protected $c = array(1,2,3); public function __get($v) { echo "$v,"; return $this->b[$v]; } public function __set($var, $val) { echo "$var: $val,"; $this->$var = $val; } } $m = new Magic(); echo $m->a.",".$m->b; //echo $m->a.",".$m->b.",".$m->c.","; //$m->c = "CC"; //echo $m->a.",".$m->b.",".$m->c;
based on 43B6N
Output for 5.6.0 - 5.6.30, hhvm-3.15.4 - 3.17.3, 7.0.0 - 7.3.0alpha1
b,A,B
Output for hhvm-3.12.14

Process exited with code 137.