1--TEST--
2Ensure __autoload is called twice if unserialize_callback_func is defined.
3--FILE--
4<?php
5spl_autoload_register(function ($name) {
6    echo "in autoload($name)\n";
7});
8
9ini_set('unserialize_callback_func','check');
10
11function check($name) {
12    echo "in check($name)\n";
13}
14
15$o = unserialize('O:3:"FOO":0:{}');
16
17var_dump($o);
18
19echo "Done";
20?>
21--EXPECTF--
22in autoload(FOO)
23in check(FOO)
24in autoload(FOO)
25
26Warning: unserialize(): Function check() hasn't defined the class it was called for in %s on line %d
27object(__PHP_Incomplete_Class)#%d (1) {
28  ["__PHP_Incomplete_Class_Name"]=>
29  string(3) "FOO"
30}
31Done
32