3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class logger { function __construct() { print "logger constructing\n"; } function __wakeup() { print "logger wakeup\n"; } function __destruct() { print "logger destruct\n"; } } class obj { var $prop; function __wakeup() { $this->prop = 'awake'; } } $x = 'a:4:{i:0;O:8:"stdClass":1:{i:0;O:6:"logger":0:{}}i:1;O:3:"obj":1:{s:4:"prop";R:2;}i:2;R:3}'; $y = unserialize($x); var_dump($y);
based on 3ET2a
Output for 7.1.5 - 7.2.0
Notice: unserialize(): Error at offset 86 of 90 bytes in /in/WnfMB on line 22 logger wakeup logger destruct bool(false)
Output for 7.1.0
logger wakeup Notice: unserialize(): Error at offset 86 of 90 bytes in /in/WnfMB on line 22 logger destruct bool(false)
Output for 5.3.22 - 7.0.20
logger wakeup logger destruct Notice: unserialize(): Error at offset 86 of 90 bytes in /in/WnfMB on line 22 bool(false)