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":0{}'; $data = unserialize($foo); var_dump($data);
Output for 7.1.0
haha Notice: unserialize(): Error at offset 13 of 12 bytes in /in/d8tg4 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 13 of 12 bytes in /in/d8tg4 on line 12 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Notice: Unable to unserialize: [O:2:"hi":0{}]. Expected ':' but got '{'. in /in/d8tg4 on line 12 bool(false)
Output for 4.3.2 - 4.4.9
haha Notice: unserialize(): Error at offset 13 of 12 bytes in /in/d8tg4 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 13 of 12 bytes in /in/d8tg4 on line 12 bool(false)