3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class obj { var $y; function __wakeup() { $this->y = (int)$this->y; } } var_dump(unserialize('a:2:{i:0;C:3:"GMP":17:{s:4:"1234";a:0:{}}i:1;O:3:"obj":1:{s:1:"y";R:2;}}'));
based on uDbQl
Output for 5.6.7 - 5.6.20, 5.6.28 - 7.0.5, 7.0.20 - 7.2.0
array(2) { [0]=> &int(1234) [1]=> object(obj)#2 (1) { ["y"]=> &int(1234) } }
Output for 5.3.18 - 5.5.35, 5.6.21, 7.0.6
Warning: Class __PHP_Incomplete_Class has no unserializer in /in/4Vm9t on line 10 Notice: Object of class __PHP_Incomplete_Class could not be converted to int in /in/4Vm9t on line 6 array(2) { [0]=> &int(1) [1]=> object(obj)#2 (1) { ["y"]=> &int(1) } }