3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ToS{var $message; var $file; function getMessage(){return $this->message;}function __toString(){die("hi there");}} //$e=new exception; $e=unserialize('O:9:"Exception":1:{s:19:"'."\0".'Exception'."\0".'previous";O:3:"ToS":2:{s:7:"message";s:2:"hi";s:4:"file";s:3:"bye"}}'); echo $e;
Output for 8.3.0 - 8.3.6
Warning: unserialize(): Error at offset 102 of 104 bytes in /in/IGgbs on line 4
Output for 5.6.21 - 5.6.40, 7.0.6 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Notice: unserialize(): Error at offset 102 of 104 bytes in /in/IGgbs on line 4
Output for 7.3.32 - 7.3.33
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.20, 7.0.0 - 7.0.5
Notice: unserialize(): Error at offset 105 of 104 bytes in /in/IGgbs on line 4

preferences:
300.99 ms | 402 KiB | 376 Q