3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function __set($name, $value) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } public function test($name) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } } $a = new A(); $a->test('test'); $a->test = 5;
based on pnEAu
Output for 7.0.0 - 7.2.0
testxxxtestxxx
Output for 5.3.19 - 5.6.21
testtesttesttest