xref: /PHP-8.0/ext/spl/tests/bug74372.phpt (revision 55a15f32)
1--TEST--
2Bug #74372: autoloading file with syntax error uses next autoloader, may hide parse error
3--FILE--
4<?php
5
6spl_autoload_register(function($class) {
7    eval("ha ha ha");
8});
9spl_autoload_register(function($class) {
10    echo "Don't call me.\n";
11});
12
13new Foo;
14
15?>
16--EXPECTF--
17Parse error: syntax error, unexpected identifier "ha" in %s on line %d
18