3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($foo) { $foo->bar++; } var_dump(foo($foo));
Output for 5.5.0 - 5.6.26, 7.0.0 - 7.1.0
Notice: Undefined variable: foo in /in/dL4LB on line 5 Warning: Creating default object from empty value in /in/dL4LB on line 3 Notice: Undefined property: stdClass::$bar in /in/dL4LB on line 3 NULL
Output for 5.4.0 - 5.4.45, hhvm-3.10.0 - 3.13.2
Notice: Undefined variable: foo in /in/dL4LB on line 5 Warning: Creating default object from empty value in /in/dL4LB on line 3 NULL
Output for 5.0.4 - 5.3.29
Notice: Undefined variable: foo in /in/dL4LB on line 5 Strict Standards: Creating default object from empty value in /in/dL4LB on line 3 NULL
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: foo in /in/dL4LB on line 5 Strict Standards: Creating default object from empty value in /in/dL4LB on line 3 NULL
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: foo in /in/dL4LB on line 5 Notice: Undefined property: bar in /in/dL4LB on line 3 NULL