File: stack-filter-path-exclude-001.phpt

package info (click to toggle)
xdebug 3.4.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,096 kB
  • sloc: ansic: 19,944; php: 6,217; xml: 4,172; pascal: 534; makefile: 4; sh: 2
file content (92 lines) | stat: -rw-r--r-- 3,994 bytes parent folder | download
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
--TEST--
Filtered stack traces: path exclude [1]
--INI--
xdebug.mode=develop
--FILE--
<?php
$includeDir = realpath( __DIR__ . '/..' ); $s = DIRECTORY_SEPARATOR;

include "{$includeDir}/filter/stack/one.php";
include "{$includeDir}/filter/stack/two.php";
include "{$includeDir}/filter/stack/three.php";

$three = new \Stack\Three( new stdClass );
$two = new \Stack\Two( $three );
$one = new \Stack\One( $two );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ "{$includeDir}{$s}filter{$s}stack{$s}one" ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ "{$includeDir}{$s}filter{$s}stack{$s}one.php" ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ "{$includeDir}{$s}filter{$s}stack{$s}one.p", "{$includeDir}{$s}filter{$s}stack{$s}two.php" ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ "{$includeDir}{$s}filter{$s}stack{$s}t" ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ 'x' ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ "{$includeDir}" ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );

xdebug_set_filter(XDEBUG_FILTER_STACK, XDEBUG_PATH_EXCLUDE, [ '' ] );
$one->callObj( 'callObj', 'error', 'Error triggered!' );
?>
--EXPECTF--
Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0
%w%f %w%d   2. Stack\One->callObj($name = 'callObj', ...$arguments = variadic('error', 'Error triggered!')) %sstack-filter-path-exclude-001.php:%d
%w%f %w%d   4. Stack\Three->error($value = 'Error triggered!') %stwo.php:%d
%w%f %w%d   5. trigger_error($message = 'Error triggered!', $error_%s = 512) %sthree.php:%d


Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0
%w%f %w%d   2. Stack\One->callObj($name = 'callObj', ...$arguments = variadic('error', 'Error triggered!')) %sstack-filter-path-exclude-001.php:16
%w%f %w%d   4. Stack\Three->error($value = 'Error triggered!') %stwo.php:%d
%w%f %w%d   5. trigger_error($message = 'Error triggered!', $error_%s = 512) %sthree.php:%d


Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0
%w%f %w%d   2. Stack\One->callObj($name = 'callObj', ...$arguments = variadic('error', 'Error triggered!')) %sstack-filter-path-exclude-001.php:19
%w%f %w%d   5. trigger_error($message = 'Error triggered!', $error_%s = 512) %sthree.php:%d


Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0
%w%f %w%d   2. Stack\One->callObj($name = 'callObj', ...$arguments = variadic('error', 'Error triggered!')) %sstack-filter-path-exclude-001.php:22
%w%f %w%d   3. Stack\Two->callObj($name = 'error', ...$arguments = variadic('Error triggered!')) %sone.php:%d


Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0
%w%f %w%d   2. Stack\One->callObj($name = 'callObj', ...$arguments = variadic('error', 'Error triggered!')) %sstack-filter-path-exclude-001.php:25
%w%f %w%d   3. Stack\Two->callObj($name = 'error', ...$arguments = variadic('Error triggered!')) %sone.php:%d
%w%f %w%d   4. Stack\Three->error($value = 'Error triggered!') %stwo.php:%d
%w%f %w%d   5. trigger_error($message = 'Error triggered!', $error_%s = 512) %sthree.php:%d


Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0


Warning: Error triggered! in %sthree.php on line %d

Call Stack:
%w%f %w%d   1. {main}() %sstack-filter-path-exclude-001.php:0