3v4l.org

run code in 200+ 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.10 - 7.2.6
Notice: unserialize(): Error at offset 12 of 12 bytes in /in/d8tg4 on line 12 hahahibool(false)
Output for 7.1.5 - 7.1.7
Notice: unserialize(): Error at offset 13 of 12 bytes in /in/d8tg4 on line 12 hahahibool(false)
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 - 7.0.20
hahahi Notice: unserialize(): Error at offset 13 of 12 bytes 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)