forked from xdebug/xdebug
-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
test18.phpt
41 lines (37 loc) · 820 Bytes
/
test18.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
--TEST--
Test with eval()
--INI--
xdebug.enable=1
xdebug.auto_trace=0
xdebug.collect_params=1
xdebug.auto_profile=0
--FILE--
<?php
xdebug_start_trace();
function bar()
{
return "bar";
}
function foo()
{
return bar();
}
foo();
eval("\$foo = foo();\nbar();\nfoo();\n");
echo $foo;
xdebug_dump_function_trace();
?>
--EXPECTF--
bar
Function trace:
%f %d -> foo() /%s/test18.php:14
%f %d -> bar() /%s/test18.php:11
%f %d -> eval($foo = foo();
bar();
foo();
) /%s/test18.php:16
%f %d -> foo() /%s/test18.php(16) : eval()'d code:1
%f %d -> bar() /%s/test18.php:11
%f %d -> bar() /%s/test18.php(16) : eval()'d code:2
%f %d -> foo() /%s/test18.php(16) : eval()'d code:3
%f %d -> bar() /%s/test18.php:11