3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class hi { function __destruct() { echo 'hi'; } } $foo = 'C:2:"hi":'; $data = unserialize($foo); var_dump($data);
Output for 5.3.0 - 7.1.7
Warning: Insufficient data for unserializing - 0 required, -2 present in /in/66sNk on line 9 Notice: unserialize(): Error at offset 11 of 9 bytes in /in/66sNk on line 9 bool(false)
Output for 5.1.0 - 5.2.17
Warning: Class hi has no unserializer in /in/66sNk on line 9 Notice: unserialize(): Error at offset 7 of 9 bytes in /in/66sNk on line 9 bool(false)
Output for 4.3.2 - 5.0.5
Notice: unserialize(): Error at offset 0 of 9 bytes in /in/66sNk on line 9 bool(false)
Output for 4.3.0 - 4.3.1
Notice: unserialize() [http://www.php.net/function.unserialize]: Error at offset 0 of 9 bytes in /in/66sNk on line 9 bool(false)