3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { var $a = Bar; var $b = Baz; } define('Bar', 1); define('Baz', 2); var_dump(new Foo);
based on 07guv
Output for 5.1.3 - 7.1.0
object(Foo)#1 (2) { ["a"]=> int(1) ["b"]=> int(2) }
Output for 5.0.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/dE8ta on line 4 Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/dE8ta on line 5 object(Foo)#1 (2) { ["a"]=> int(1) ["b"]=> int(2) }
Output for 4.3.0 - 4.4.9
object(foo)(2) { ["a"]=> int(1) ["b"]=> int(2) }