forked from xdebug/xdebug
/
assignment-trace8-php52.phpt
68 lines (62 loc) · 2.58 KB
/
assignment-trace8-php52.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
63
64
65
66
67
68
--TEST--
Test for tracing multi-dimensional property assignments in user-readable function traces (< PHP 5.3)
--SKIPIF--
<?php if (!version_compare(phpversion(), "5.3", '<')) echo "skip < PHP 5.3 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.var_display_max_depth=9
--FILE--
<?php
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));
class testClass
{
public $a;
static public $b;
function __construct( $obj )
{
$obj->a = new StdClass;
$obj->a->bar = 52;
$obj->a->foo = new StdClass;
$obj->a->foo->bar = 52;
$this->a = new StdClass;
$this->a->bar = 52;
$this->a->foo = new StdClass;
$this->a->foo->bar = 52;
self::$b = new StdClass;
self::$b->bar = 52;
self::$b->foo = new StdClass;
self::$b->foo->bar = 52;
}
}
$a = new testClass( new StdClass );
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '/tmp/%s.xt' %sassignment-trace8-php52.php:2
%w%f %w%d -> testClass->__construct($obj = class stdClass { }) %sassignment-trace8-php52.php:28
=> $obj->a = class stdClass { } %sassignment-trace8-php52.php:11
=> $obj->a->bar = 52 %sassignment-trace8-php52.php:12
=> $obj->a->foo = class stdClass { } %sassignment-trace8-php52.php:13
=> $obj->a->foo->bar = 52 %sassignment-trace8-php52.php:14
=> $this->a = class stdClass { } %sassignment-trace8-php52.php:16
=> $this->a->bar = 52 %sassignment-trace8-php52.php:17
=> $this->a->foo = class stdClass { } %sassignment-trace8-php52.php:18
=> $this->a->foo->bar = 52 %sassignment-trace8-php52.php:19
=> self::b = class stdClass { } %sassignment-trace8-php52.php:21
=> self::b->bar = 52 %sassignment-trace8-php52.php:22
=> self::b->foo = class stdClass { } %sassignment-trace8-php52.php:23
=> b->foo->bar = 52 %sassignment-trace8-php52.php:24
=> $a = class testClass { public $a = class stdClass { public $bar = 52; public $foo = class stdClass { public $bar = 52 } } } %sassignment-trace8-php52.php:28
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace8-php52.php:30
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]