3v4l.org

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