Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: XDEBUG_2_0_0
Fetching contributors…

Cannot retrieve contributors at this time

file 46 lines (42 sloc) 1.087 kb
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 with eval()
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.collect_params=3
xdebug.collect_return=0
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
--FILE--
<?php
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));

function bar()
{
return "bar";
}

function foo()
{
return bar();
}

foo();

eval("\$foo = foo();\nbar();\nfoo();\n");
echo $foo, "\n";
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
bar
TRACE START [%d-%d-%d %d:%d:%d]
%w%f %w%d -> foo() /%s/test18.php:14
%w%f %w%d -> bar() /%s/test18.php:11
%w%f %w%d -> eval('$foo = foo();\nbar();\nfoo();\n') /%s/test18.php:16
%w%f %w%d -> foo() /%s/test18.php(16) : eval()'d code:1
%w%f %w%d -> bar() /%s/test18.php:11
%w%f %w%d -> bar() /%s/test18.php(16) : eval()'d code:2
%w%f %w%d -> foo() /%s/test18.php(16) : eval()'d code:3
%w%f %w%d -> bar() /%s/test18.php:11
%w%f %w%d -> file_get_contents('/tmp/%s') /%s/test18.php:18
Something went wrong with that request. Please try again.