3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class hi { function __destruct() { echo 'hi'; } } $foo = 'C:2:"hi":1:{}'; $data = unserialize($foo); var_dump($data);
Output for 5.3.0 - 7.1.0
Warning: Insufficient data for unserializing - 1 required, 1 present in /in/OZLZn on line 9 Notice: unserialize(): Error at offset 12 of 13 bytes in /in/OZLZn on line 9 bool(false)
Output for 5.1.0 - 5.2.17
Warning: Class hi has no unserializer in /in/OZLZn on line 9 Notice: unserialize(): Error at offset 7 of 13 bytes in /in/OZLZn on line 9 bool(false)
Output for 4.3.2 - 5.0.5
Notice: unserialize(): Error at offset 0 of 13 bytes in /in/OZLZn 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 13 bytes in /in/OZLZn on line 9 bool(false)