xref: /PHP-8.3/ext/spl/tests/bug71236.phpt (revision 5b59d491)
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--EXPECT--
12array(2) {
13  [0]=>
14  object(Closure)#1 (1) {
15    ["parameter"]=>
16    array(1) {
17      ["$class"]=>
18      string(10) "<required>"
19    }
20  }
21  [1]=>
22  string(12) "spl_autoload"
23}
24