3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $name='Ian'; $user -> $name; echo $user; $foo = new foo();
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: user in /in/6moke on line 4 Notice: Trying to get property of non-object in /in/6moke on line 4 Notice: Undefined variable: user in /in/6moke on line 5 Fatal error: Uncaught Error: Class 'foo' not found in /in/6moke:7 Stack trace: #0 {main} thrown in /in/6moke on line 7
Process exited with code 255.
Output for 5.0.4 - 5.6.28
Notice: Undefined variable: user in /in/6moke on line 4 Notice: Trying to get property of non-object in /in/6moke on line 4 Notice: Undefined variable: user in /in/6moke on line 5 Fatal error: Class 'foo' not found in /in/6moke on line 7
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: user in /in/6moke on line 4 Notice: Trying to get property of non-object in /in/6moke on line 4 Notice: Undefined variable: user in /in/6moke on line 5 Fatal error: Class 'foo' not found in /in/6moke on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: user in /in/6moke on line 4 Notice: Undefined variable: user in /in/6moke on line 5 Fatal error: Cannot instantiate non-existent class: foo in /in/6moke on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: user in /in/6moke on line 4 Notice: Undefined variable: user in /in/6moke on line 5 Fatal error: Cannot instantiate non-existent class: foo in /in/6moke on line 7