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.4
Warning: Undefined variable $name in /in/4otbd on line 4 Warning: Undefined variable $foo in /in/4otbd on line 4 Warning: Attempt to read property "foo" on null in /in/4otbd on line 4 Warning: Undefined variable $foo in /in/4otbd on line 5 Warning: Attempt to read property "bar" on null in /in/4otbd on line 5 Warning: Trying to access array offset on null in /in/4otbd on line 5 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.27, 8.2.0 - 8.2.17
Warning: Undefined variable $name in /in/4otbd on line 4 Warning: Undefined variable $foo in /in/4otbd on line 4 Warning: Attempt to read property "foo" on null in /in/4otbd on line 4 Warning: Undefined variable $foo in /in/4otbd on line 5 Warning: Attempt to read property "bar" on null in /in/4otbd on line 5 Warning: Trying to access array offset on value of type null in /in/4otbd on line 5 My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Notice: Undefined variable: name in /in/4otbd on line 4 Notice: Undefined variable: foo in /in/4otbd on line 4 Notice: Trying to get property 'foo' of non-object in /in/4otbd on line 4 Notice: Undefined variable: foo in /in/4otbd on line 5 Notice: Trying to get property 'bar' of non-object in /in/4otbd on line 5 Notice: Trying to access array offset on value of type null in /in/4otbd on line 5 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, 7.4.26
My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 7.3.0 - 7.3.31
Notice: Undefined variable: name in /in/4otbd on line 4 Notice: Undefined variable: foo in /in/4otbd on line 4 Notice: Trying to get property 'foo' of non-object in /in/4otbd on line 4 Notice: Undefined variable: foo in /in/4otbd on line 5 Notice: Trying to get property 'bar' of non-object in /in/4otbd on line 5 My name is "". I am printing some . Now, I am printing some . This should print a capital 'A': A
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Parse error: syntax error, unexpected end of file in /in/4otbd on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/4otbd on line 7
Process exited with code 255.

preferences:
183.01 ms | 401 KiB | 372 Q