3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $bar = &$_SESSION['foo']; var_dump($_SESSION['foo']); $test=new test(); $foo = 1; ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
NULL Fatal error: Uncaught Error: Class "test" not found in /in/MoYG0:7 Stack trace: #0 {main} thrown in /in/MoYG0 on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.33
NULL Fatal error: Uncaught Error: Class 'test' not found in /in/MoYG0:7 Stack trace: #0 {main} thrown in /in/MoYG0 on line 7
Process exited with code 255.
Output for 7.3.33
Warning: session_start(): open(/tmp/sess_872aac5825535bcf8c6e23af4f820716, O_RDWR) failed: No space left on device (28) in /in/MoYG0 on line 2 Warning: session_start(): Failed to read session data: files (path: ) in /in/MoYG0 on line 2 NULL Fatal error: Uncaught Error: Class 'test' not found in /in/MoYG0:7 Stack trace: #0 {main} thrown in /in/MoYG0 on line 7
Process exited with code 255.
Output for 7.3.32
Warning: session_start(): open(/tmp/sess_0e7de348e868e7b9d62e6bf6a81a9435, O_RDWR) failed: No space left on device (28) in /in/MoYG0 on line 2 Warning: session_start(): Failed to read session data: files (path: ) in /in/MoYG0 on line 2 NULL Fatal error: Uncaught Error: Class 'test' not found in /in/MoYG0:7 Stack trace: #0 {main} thrown in /in/MoYG0 on line 7
Process exited with code 255.
Output for 5.2.3 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.35, 5.6.0 - 5.6.28
NULL Fatal error: Class 'test' not found in /in/MoYG0 on line 7
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
<br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/in/MoYG0</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /in/MoYG0:2) in <b>/in/MoYG0</b> on line <b>2</b><br /> NULL <br /> <b>Fatal error</b>: Class 'test' not found in <b>/in/MoYG0</b> on line <b>7</b><br />
Process exited with code 255.
Output for 4.4.3 - 4.4.9
<br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/in/MoYG0</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /in/MoYG0:2) in <b>/in/MoYG0</b> on line <b>2</b><br /> NULL <br /> <b>Fatal error</b>: Cannot instantiate non-existent class: test in <b>/in/MoYG0</b> on line <b>7</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.2
<br /> <b>Warning</b>: session_start(): Cannot send session cookie - headers already sent in <b>/in/MoYG0</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/MoYG0:2) in <b>/in/MoYG0</b> on line <b>2</b><br /> NULL <br /> <b>Fatal error</b>: Cannot instantiate non-existent class: test in <b>/in/MoYG0</b> on line <b>7</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: session_start() [<a href='http://www.php.net/function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/in/MoYG0</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start() [<a href='http://www.php.net/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /in/MoYG0:2) in <b>/in/MoYG0</b> on line <b>2</b><br /> NULL <br /> <b>Fatal error</b>: Cannot instantiate non-existent class: test in <b>/in/MoYG0</b> on line <b>7</b><br />

preferences:
232.21 ms | 402 KiB | 346 Q