3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo <<<EOT My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should print a capital 'A': \x41 EOT;
Output for 8.3.0 - 8.3.6
Warning: Undefined variable $name in /in/LqOQ9 on line 3 Warning: Undefined variable $foo in /in/LqOQ9 on line 3 Warning: Attempt to read property "foo" on null in /in/LqOQ9 on line 3 Warning: Undefined variable $foo in /in/LqOQ9 on line 4 Warning: Attempt to read property "bar" on null in /in/LqOQ9 on line 4 Warning: Trying to access array offset on null in /in/LqOQ9 on line 4 My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: Undefined variable $name in /in/LqOQ9 on line 3 Warning: Undefined variable $foo in /in/LqOQ9 on line 3 Warning: Attempt to read property "foo" on null in /in/LqOQ9 on line 3 Warning: Undefined variable $foo in /in/LqOQ9 on line 4 Warning: Attempt to read property "bar" on null in /in/LqOQ9 on line 4 Warning: Trying to access array offset on value of type null in /in/LqOQ9 on line 4 My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 7.4.3 - 7.4.33
Notice: Undefined variable: name in /in/LqOQ9 on line 3 Notice: Undefined variable: foo in /in/LqOQ9 on line 3 Notice: Trying to get property 'foo' of non-object in /in/LqOQ9 on line 3 Notice: Undefined variable: foo in /in/LqOQ9 on line 4 Notice: Trying to get property 'bar' of non-object in /in/LqOQ9 on line 4 Notice: Trying to access array offset on value of type null in /in/LqOQ9 on line 4 My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 7.3.32 - 7.3.33
My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 7.3.16 - 7.3.31
Notice: Undefined variable: name in /in/LqOQ9 on line 3 Notice: Undefined variable: foo in /in/LqOQ9 on line 3 Notice: Trying to get property 'foo' of non-object in /in/LqOQ9 on line 3 Notice: Undefined variable: foo in /in/LqOQ9 on line 4 Notice: Trying to get property 'bar' of non-object in /in/LqOQ9 on line 4 My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 5.4.25, 7.2.29 - 7.2.33
Parse error: syntax error, unexpected end of file in /in/LqOQ9 on line 6
Process exited with code 255.

preferences:
119.7 ms | 402 KiB | 141 Q