3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function autoloader($className) { echo "Autoload: '$className'\n"; } if (function_exists('spl_autoload_register')) { spl_autoload_register('autoloader'); ini_set('unserialize_callback_func', 'spl_autoload_call'); } else { function __autoload($className) { return autoloader($className); } } $classStr = 'O:1:"a":0:{}'; var_dump(unserialize($classStr));
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Autoload: 'a' Autoload: 'a' Autoload: 'a' Warning: unserialize(): Function spl_autoload_call() hasn't defined the class it was called for in /in/UKr3n on line 19 object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(1) "a" }
Output for 5.0.0 - 5.0.5, hhvm-3.10.0 - 3.12.0
Autoload: 'a' object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(1) "a" }
Output for 4.3.0 - 4.4.9
object(__PHP_Incomplete_Class)(1) { ["__PHP_Incomplete_Class_Name"]=> string(1) "a" }