forked from xdebug/xdebug
-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
bug00756.phpt
62 lines (57 loc) · 1.62 KB
/
bug00756.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--TEST--
Test for bug #756: Tracing doesn't always understand the variables and shows IS_VAR
--INI--
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_output_dir=/tmp
xdebug.trace_output_name=trace.%c
xdebug.collect_return=1
xdebug.collect_params=3
xdebug.collect_assignments=1
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
--FILE--
<?php
class foo
{
static $bar;
public $foo;
static function bar()
{
self::$bar++;
}
function foo()
{
$this->foo++;
}
}
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));
$trace_file = xdebug_get_tracefile_name();
foo::bar();
$f = new foo;
$f->foo();
echo file_get_contents($trace_file);
unlink($trace_file);
echo "DONE\n";
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '/tmp/xdt%s.%s.xt' %sbug00756.php:18
%w%f %w%d -> xdebug_get_tracefile_name() %sbug00756.php:19
>=> '/tmp/xdt%s.%s.xt'
=> $trace_file = '/tmp/xdt%s.%s.xt' %sbug00756.php:19
%w%f %w%d -> foo::bar() %sbug00756.php:21
=> self::bar++ %sbug00756.php:9
>=> NULL
%w%f %w%d -> foo->foo() %sbug00756.php:22
=> $this->foo++ %sbug00756.php:14
>=> NULL
=> $f = class foo { public $foo = 1 } %sbug00756.php:22
%w%f %w%d -> foo->foo() %sbug00756.php:23
=> $this->foo++ %sbug00756.php:14
>=> NULL
%w%f %w%d -> file_get_contents('/tmp/xdt%s.%s.xt') %sbug00756.php:25
DONE