blob: 2af2d9adc4aff6a15b2b438f4d42cd3bdd1aef32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Ensure type hints for unknown types do not trigger autoload.
--FILE--
<?php
function __autoload($name)
{
echo "In autoload: ";
var_dump($name);
}
function f(UndefClass $x)
{
}
f(new stdClass);
?>
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
thrown in %s on line %d
|