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
|
--TEST--
Test for tracing mixed array element and property assignments in user-readable function traces
--INI--
xdebug.mode=trace
xdebug.start_with_request=no
xdebug.trace_format=0
xdebug.collect_return=0
xdebug.collect_assignments=1
xdebug.var_display_max_depth=9
--FILE--
<?php
require_once 'capture-trace.inc';
class testClass
{
public $a;
static public $b;
function __construct( $obj )
{
$obj->a = array();
$obj->a['bar'] = 52;
$obj->a['foo'] = new StdClass;
$obj->a['foo']->bar = 52;
$this->a = array();
$this->a['bar'] = 52;
$this->a['foo'] = new StdClass;
$this->a['foo']->bar = 52;
self::$b = array();
self::$b['bar'] = array();
self::$b['foo'] = new StdClass;
self::$b['foo']->bar = 52;
static::$b = array();
static::$b['bar'] = array();
static::$b['foo'] = new StdClass;
static::$b['foo']->bar = 52;
}
}
$a = new testClass( new StdClass );
xdebug_stop_trace();
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d.%d]
=> $tf = '%sxt%S' %s:%d
%w%f %w%d -> testClass->__construct($obj = class stdClass { }) %sassignment-trace-009.php:33
=> $obj->a = [] %sassignment-trace-009.php:11
=> $obj->a['bar'] = 52 %sassignment-trace-009.php:12
=> $obj->a['foo'] = class stdClass { } %sassignment-trace-009.php:13
=> $obj->a['foo']->bar = 52 %sassignment-trace-009.php:14
=> $this->a = [] %sassignment-trace-009.php:16
=> $this->a['bar'] = 52 %sassignment-trace-009.php:17
=> $this->a['foo'] = class stdClass { } %sassignment-trace-009.php:18
=> $this->a['foo']->bar = 52 %sassignment-trace-009.php:19
=> self::b = [] %sassignment-trace-009.php:21
=> self::b['bar'] = [] %sassignment-trace-009.php:22
=> self::b['foo'] = class stdClass { } %sassignment-trace-009.php:23
=> self::b['foo']->bar = 52 %sassignment-trace-009.php:24
=> self::b = [] %sassignment-trace-009.php:26
=> self::b['bar'] = [] %sassignment-trace-009.php:27
=> self::b['foo'] = class stdClass { } %sassignment-trace-009.php:28
=> self::b['foo']->bar = 52 %sassignment-trace-009.php:29
=> $a = class testClass { public $a = ['bar' => 52, 'foo' => class stdClass { public $bar = 52 }] } %sassignment-trace-009.php:33
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-009.php:35
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d.%d]
|