2005-08-05 09:35:09 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #33996 (No information given for fatal error on passing invalid value to typed argument)
|
|
|
|
--INI--
|
2005-09-19 07:23:47 +00:00
|
|
|
error_reporting=8191
|
2005-08-05 09:35:09 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class Foo
|
|
|
|
{
|
|
|
|
// nothing
|
|
|
|
}
|
|
|
|
|
|
|
|
function FooTest(Foo $foo)
|
|
|
|
{
|
|
|
|
echo "Hello!";
|
|
|
|
}
|
|
|
|
|
|
|
|
function NormalTest($a)
|
|
|
|
{
|
|
|
|
echo "Hi!";
|
|
|
|
}
|
|
|
|
|
2016-06-15 23:32:02 +00:00
|
|
|
try {
|
|
|
|
NormalTest();
|
|
|
|
} catch (Throwable $e) {
|
|
|
|
echo "Exception: " . $e->getMessage() . "\n";
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
FooTest();
|
|
|
|
} catch (Throwable $e) {
|
|
|
|
echo "Exception: " . $e->getMessage() . "\n";
|
|
|
|
}
|
2005-08-05 09:35:09 +00:00
|
|
|
FooTest(new Foo());
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2016-06-15 23:32:02 +00:00
|
|
|
Exception: Too few arguments to function NormalTest(), 0 passed in %sbug33996.php on line 18 and exactly 1 expected
|
|
|
|
Exception: Too few arguments to function FooTest(), 0 passed in %sbug33996.php on line 23 and exactly 1 expected
|
|
|
|
Hello!
|