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:"hiaaaa}'; $data = unserialize($foo); var_dump($data);
Output for 4.3.10 - 4.4.9, 5.0.3 - 5.6.28, 7.0.0 - 7.1.0
Notice: unserialize(): Error at offset 7 of 12 bytes in /in/BGUkD on line 12 bool(false)
Output for hhvm-3.10.0 - 3.13.2
Notice: Unable to unserialize: [O:2:"hiaaaa}]. Expected '"' but got 'a'. in /in/BGUkD on line 12 bool(false)
Output for 5.0.0 - 5.0.2
hahaobject(hi)#1 (0) { } hi
Output for 4.3.0 - 4.3.9
hahaobject(hi)(0) { }