1--TEST--
2Ensure __autoload is called twice if unserialize_callback_func is defined.
3--FILE--
4<?php
5/* Prototype  : proto string serialize(mixed variable)
6 * Description: Returns a string representation of variable (which can later be unserialized)
7 * Source code: ext/standard/var.c
8 * Alias to functions:
9 */
10/* Prototype  : proto mixed unserialize(string variable_representation)
11 * Description: Takes a string representation of variable and recreates it
12 * Source code: ext/standard/var.c
13 * Alias to functions:
14 */
15
16function __autoload($name) {
17	echo "in __autoload($name)\n";
18}
19
20ini_set('unserialize_callback_func','check');
21
22function check($name) {
23	echo "in check($name)\n";
24}
25
26$o = unserialize('O:3:"FOO":0:{}');
27
28var_dump($o);
29
30echo "Done";
31?>
32--EXPECTF--
33in __autoload(FOO)
34in check(FOO)
35in __autoload(FOO)
36
37Warning: unserialize(): Function check() hasn't defined the class it was called for in %s on line 23
38object(__PHP_Incomplete_Class)#%d (1) {
39  ["__PHP_Incomplete_Class_Name"]=>
40  string(3) "FOO"
41}
42Done