-
-
Notifications
You must be signed in to change notification settings - Fork 564
/
bug00391.phpt
46 lines (38 loc) · 1.14 KB
/
bug00391.phpt
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
38
39
40
41
42
43
44
45
46
--TEST--
Test for bug #391: When PHP runs with Xdebug it doesn't stop executing script when type hinting leads to fatal error
--INI--
log_errors=0
xdebug.default_enable=1
xdebug.dump.GET=
xdebug.dump.SERVER=
xdebug.collect_params=0
xdebug.show_local_vars=0
xdebug.show_error_trace=1
--FILE--
<?php
class A
{
public $x = 1;
}
class B
{
public function myMethod(A $y)
{
echo $y, "\n";
}
}
$z = new B();
$z->myMethod(123);
echo "And going and going...\n";
?>
DONE
--EXPECTF--
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391.php on line 17 in %sbug00391.php on line 10
Call Stack:
%w%f%w%d 1. {main}() %sbug00391.php:0
%w%f%w%d 2. B->myMethod() %sbug00391.php:17
Fatal error: Uncaught TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391.php on line 17 and defined in %sbug00391.php on line 10
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391.php on line 17 in %sbug00391.php on line 10
Call Stack:
%w%f%w%d 1. {main}() %sbug00391.php:0
%w%f%w%d 2. B->myMethod() %sbug00391.php:17