File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #63741 (Crash when autoloading from spl)
3
+ --FILE--
4
+ <?php
5
+ file_put_contents (dirname (__FILE__ )."/bug63741.tmp.php " ,
6
+ <<<'EOT'
7
+ <?php
8
+ if (isset($autoloading))
9
+ {
10
+ class ClassToLoad
11
+ {
12
+ static function func ()
13
+ {
14
+ print "OK!\n";
15
+ }
16
+ }
17
+ return;
18
+ }
19
+ else
20
+ {
21
+ class autoloader
22
+ {
23
+ static function autoload($classname)
24
+ {
25
+ print "autoloading...\n";
26
+ $autoloading = true;
27
+ include __FILE__;
28
+ }
29
+ }
30
+
31
+ spl_autoload_register(["autoloader", "autoload"]);
32
+
33
+ function start()
34
+ {
35
+ ClassToLoad::func();
36
+ }
37
+
38
+ start();
39
+ }
40
+ ?>
41
+ EOT
42
+ );
43
+
44
+ include dirname (__FILE__ )."/bug63741.tmp.php " ;
45
+ ?>
46
+ --CLEAN--
47
+ <?php unlink (dirname (__FILE__ )."/bug63741.tmp.php " ); ?>
48
+ --EXPECT--
49
+ autoloading...
50
+ OK!
You can’t perform that action at this time.
0 commit comments