3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php class Magic { public $a = "A"; protected $b = ["a" => "A", "b" => "B", "c" => "C"]; protected $c = [1, 2, 3]; public function __get($v) { echo "$v,"; return $this->b[$v]; } } $m = new Magic(); echo $m->a.","; echo $m->b.","; echo $m->c; echo PHP_EOL; echo $m->a.",".$m->b.",".$m->c;
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '<' in /in/5F6it on line 2
Process exited with code 255.