xref: /PHP-8.4/ext/spl/tests/bug71236.phpt (revision 08b2ab22)
1--TEST--
2Bug #71236: Second call of spl_autoload_register() does nothing if it has no arguments
3--FILE--
4<?php
5
6spl_autoload_register(function ($class) {});
7spl_autoload_register();
8var_dump(spl_autoload_functions());
9
10?>
11--EXPECTF--
12array(2) {
13  [0]=>
14  object(Closure)#%d (4) {
15    ["name"]=>
16    string(%d) "{closure:%s:%d}"
17    ["file"]=>
18    string(%d) "%s"
19    ["line"]=>
20    int(%d)
21    ["parameter"]=>
22    array(1) {
23      ["$class"]=>
24      string(10) "<required>"
25    }
26  }
27  [1]=>
28  string(12) "spl_autoload"
29}
30