mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
110e0a5a2c
# Conflicts: # Zend/zend_language_scanner.c # Zend/zend_language_scanner.l # ext/simplexml/tests/SimpleXMLElement_xpath.phpt
22 lines
493 B
PHP
22 lines
493 B
PHP
--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 TypeError: 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(Object(stdClass))
|
|
#1 {main}
|
|
thrown in %s on line %d
|