3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ToS{function __toString(){die("hi");}} $e=new exception; $e=unserialize('O:9:"Exception":7:{s:7:"message";s:0:"";s:15:"Exceptionstring";s:0:"";s:4:"code";i:0;s:4:"file";s:9:"/in/1Vigq";s:4:"line";i:2;s:14:"Exceptiontrace";a:0:{}s:17:"Exceptionprevious";O:3:"ToS":0:{}}'); echo $e;
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Deprecated: Creation of dynamic property Exception::$Exceptionstring is deprecated in /in/Q5PcK on line 4 Deprecated: Creation of dynamic property Exception::$Exceptiontrace is deprecated in /in/Q5PcK on line 4 Deprecated: Creation of dynamic property Exception::$Exceptionprevious is deprecated in /in/Q5PcK on line 4 Exception in /in/1Vigq:2 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Deprecated: Creation of dynamic property Exception::$Exceptionstring is deprecated in /in/Q5PcK on line 4 Deprecated: Creation of dynamic property Exception::$Exceptiontrace is deprecated in /in/Q5PcK on line 4 Deprecated: Creation of dynamic property Exception::$Exceptionprevious is deprecated in /in/Q5PcK on line 4 Exception in /in/1Vigq:2 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}
Output for 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Exception in /in/1Vigq:2 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}
Output for 7.0.20, 7.1.0 - 7.1.20
Exception in /in/Q5PcK:4 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}
Output for 7.0.0 - 7.0.6
Notice: Undefined property: Exception::$previous in /in/Q5PcK on line 5 Exception in /in/Q5PcK:4 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}
Output for 5.4.2 - 5.4.43, 5.5.24 - 5.5.27, 5.6.8 - 5.6.11, 5.6.28
exception 'Exception' in /in/Q5PcK:4 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}
Output for 5.4.44 - 5.4.45, 5.5.28 - 5.5.35, 5.6.12 - 5.6.21
Notice: Undefined property: Exception::$previous in /in/Q5PcK on line 5 exception 'Exception' in /in/Q5PcK:4 Stack trace: #0 /in/Q5PcK(4): unserialize('O:9:"Exception"...') #1 {main}

preferences:
205.49 ms | 402 KiB | 226 Q