3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function __get($n) { $this->{$n} = 123; return 1; } function __set($n, $v) { var_dump($n, $v); } } $a = new A(); echo $a->fo;
Output for 5.6.30, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.2.9
string(2) "fo" int(123) 1