blob: 3936eb8845b8bbe098c1ce3794dbc2c037d0923a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--TEST--
Bug #33996 (No information given for fatal error on passing invalid value to typed argument)
--INI--
error_reporting=8191
--FILE--
<?php
class Foo
{
// nothing
}
function FooTest(Foo $foo)
{
echo "Hello!";
}
function NormalTest($a)
{
echo "Hi!";
}
try {
NormalTest();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
try {
FooTest();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
FooTest(new Foo());
?>
--EXPECTF--
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!
|