3v4l.org

run code in 200+ php & hhvm versions
<?php class Foo { } $foo1 = new Foo(); $foo2 = new Foo(); var_dump($foo1); var_dump($foo2); var_dump(new Foo()); var_dump(new Foo());
Output for 5.0.0 - 5.6.40, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.3.6
object(Foo)#1 (0) { } object(Foo)#2 (0) { } object(Foo)#3 (0) { } object(Foo)#3 (0) { }
Output for 4.3.0 - 4.4.9
object(foo)(0) { } object(foo)(0) { } object(foo)(0) { } object(foo)(0) { }