3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
Notice: Unable to unserialize: [C:2:"hi":]. Unexpected end of buffer during unserialization. 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)