3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class hi { function __wakeup() { echo 'haha'; } function __destruct() { echo 'hi'; } } $foo = 'O:2:"hi":a:{}'; $data = unserialize($foo); var_dump($data);
Output for 7.1.0
haha Notice: unserialize(): Error at offset 12 of 13 bytes in /in/OAWc6 on line 12 hibool(false)
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.0.14
hahahi Notice: unserialize(): Error at offset 12 of 13 bytes in /in/OAWc6 on line 12 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Notice: Unable to unserialize: [O:2:"hi":a:{}]. Expected ':' but got 'a'. in /in/OAWc6 on line 12 bool(false)
Output for 4.3.2 - 4.4.9
haha Notice: unserialize(): Error at offset 12 of 13 bytes in /in/OAWc6 on line 12 bool(false)
Output for 4.3.0 - 4.3.1
haha Notice: unserialize() [http://www.php.net/function.unserialize]: Error at offset 12 of 13 bytes in /in/OAWc6 on line 12 bool(false)