xref: /PHP-5.3/Zend/tests/bug33996.phpt (revision 610c7fbe)
1--TEST--
2Bug #33996 (No information given for fatal error on passing invalid value to typed argument)
3--INI--
4error_reporting=8191
5--FILE--
6<?php
7class Foo
8{
9    // nothing
10}
11
12function FooTest(Foo $foo)
13{
14    echo "Hello!";
15}
16
17function NormalTest($a)
18{
19    echo "Hi!";
20}
21
22NormalTest();
23FooTest();
24FooTest(new Foo());
25?>
26--EXPECTF--
27Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d
28Hi!
29Catchable 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
30