3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class HR { public $foo = 2; } $Obj1 = New HR( Foo.bar() ); $Obj2 = new stdClass( someDo( $Obj1 ) ); #EOF#
based on T5EAi
Output for 7.2.0 - 7.3.0beta1
Warning: Use of undefined constant Foo - assumed 'Foo' (this will throw an Error in a future version of PHP) in /in/Xm5EQ on line 7 Fatal error: Uncaught Error: Call to undefined function bar() in /in/Xm5EQ:7 Stack trace: #0 {main} thrown in /in/Xm5EQ on line 7
Process exited with code 255.
Output for 7.1.0 - 7.1.20
Notice: Use of undefined constant Foo - assumed 'Foo' in /in/Xm5EQ on line 7 Fatal error: Uncaught Error: Call to undefined function bar() in /in/Xm5EQ:7 Stack trace: #0 {main} thrown in /in/Xm5EQ on line 7
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.27
Output for hhvm-3.22.0
Notice: Use of undefined constant Foo - assumed 'Foo' in /in/Xm5EQ on line -1 Fatal error: Uncaught Error: Call to undefined function bar() in /in/Xm5EQ:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Notice: Use of undefined constant Foo - assumed 'Foo' in /in/Xm5EQ on line 7 Fatal error: Uncaught Error: Call to undefined function bar() in /in/Xm5EQ:7 Stack trace: #0 {main}
Process exited with code 255.