3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { } function a($input) { $input->bar = 'a'; } function b($input) { $input->baz = 'b'; } $stuff = new foo(); a($stuff); b($stuff); var_dump($stuff);
Output for 5.0.0 - 7.1.0
object(foo)#1 (2) { ["bar"]=> string(1) "a" ["baz"]=> string(1) "b" }
Output for 4.3.0 - 4.4.9
object(foo)(0) { }