php-src/tests/lang/catchable_error_001.phpt
Aaron Piotrowski 110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00

27 lines
530 B
PHP

--TEST--
Catchable fatal error [1]
--FILE--
<?php
class Foo {
}
function blah (Foo $a)
{
}
function error()
{
$a = func_get_args();
var_dump($a);
}
blah (new StdClass);
echo "ALIVE!\n";
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
Stack trace:
#0 %s(%d): blah(Object(stdClass))
#1 {main}
thrown in %scatchable_error_001.php on line 5