2005-08-05 17:35:09 +08:00
--TEST--
Bug #33996 (No information given for fatal error on passing invalid value to typed argument)
--INI--
2005-09-19 15:23:47 +08:00
error_reporting=8191
2005-08-05 17:35:09 +08:00
--FILE--
<?php
class Foo
{
// nothing
}
function FooTest(Foo $foo)
{
echo "Hello!";
}
function NormalTest($a)
{
echo "Hi!";
}
NormalTest();
FooTest();
FooTest(new Foo());
?>
--EXPECTF--
2006-05-21 19:23:35 +08:00
Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d
2005-08-05 17:35:09 +08:00
Hi!
2006-05-26 08:26:45 +08:00
Catchable fatal error: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d