Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 69 lines (62 sloc) 2.646 kB
0051316 @derickr - Fixed some tests by making them work with PHP 5.1-PHP 5.3.
authored
1 --TEST--
2 Test for tracing multi-dimensional property assignments in user-readable function traces (< PHP 5.3)
3 --SKIPIF--
903e2fb @derickr Tests clean-up (probably only part 1 though...)
authored
4 <?php if (!version_compare(phpversion(), "5.3", '<')) echo "skip < PHP 5.3 needed\n"; ?>
0051316 @derickr - Fixed some tests by making them work with PHP 5.1-PHP 5.3.
authored
5 --INI--
6 xdebug.default_enable=1
7 xdebug.profiler_enable=0
8 xdebug.auto_trace=0
9 xdebug.trace_format=0
10 xdebug.collect_vars=1
11 xdebug.collect_params=4
5263931 @derickr - Get rid of ZE1 tests
authored
12 xdebug.collect_return=0
0051316 @derickr - Fixed some tests by making them work with PHP 5.1-PHP 5.3.
authored
13 xdebug.collect_assignments=1
14 xdebug.var_display_max_depth=9
15 --FILE--
16 <?php
17 $tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));
18
19 class testClass
20 {
21 public $a;
22 static public $b;
23
24 function __construct( $obj )
25 {
26 $obj->a = new StdClass;
27 $obj->a->bar = 52;
28 $obj->a->foo = new StdClass;
29 $obj->a->foo->bar = 52;
30
31 $this->a = new StdClass;
32 $this->a->bar = 52;
33 $this->a->foo = new StdClass;
34 $this->a->foo->bar = 52;
35
36 self::$b = new StdClass;
37 self::$b->bar = 52;
38 self::$b->foo = new StdClass;
39 self::$b->foo->bar = 52;
40 }
41 }
42
43 $a = new testClass( new StdClass );
44
45 xdebug_stop_trace();
46 echo file_get_contents($tf);
47 unlink($tf);
48 ?>
49 --EXPECTF--
50 TRACE START [%d-%d-%d %d:%d:%d]
44b1bfb @derickr Fixed a few test cases.
authored
51 => $tf = '/tmp/%s.xt' %sassignment-trace8-php52.php:2
0051316 @derickr - Fixed some tests by making them work with PHP 5.1-PHP 5.3.
authored
52 %w%f %w%d -> testClass->__construct($obj = class stdClass { }) %sassignment-trace8-php52.php:28
44b1bfb @derickr Fixed a few test cases.
authored
53 => $obj->a = class stdClass { } %sassignment-trace8-php52.php:11
54 => $obj->a->bar = 52 %sassignment-trace8-php52.php:12
55 => $obj->a->foo = class stdClass { } %sassignment-trace8-php52.php:13
56 => $obj->a->foo->bar = 52 %sassignment-trace8-php52.php:14
57 => $this->a = class stdClass { } %sassignment-trace8-php52.php:16
58 => $this->a->bar = 52 %sassignment-trace8-php52.php:17
59 => $this->a->foo = class stdClass { } %sassignment-trace8-php52.php:18
60 => $this->a->foo->bar = 52 %sassignment-trace8-php52.php:19
61 => self::b = class stdClass { } %sassignment-trace8-php52.php:21
62 => self::b->bar = 52 %sassignment-trace8-php52.php:22
63 => self::b->foo = class stdClass { } %sassignment-trace8-php52.php:23
64 => b->foo->bar = 52 %sassignment-trace8-php52.php:24
65 => $a = class testClass { public $a = class stdClass { public $bar = 52; public $foo = class stdClass { public $bar = 52 } } } %sassignment-trace8-php52.php:28
0051316 @derickr - Fixed some tests by making them work with PHP 5.1-PHP 5.3.
authored
66 %w%f %w%d -> xdebug_stop_trace() %sassignment-trace8-php52.php:30
67 %w%f %w%d
68 TRACE END [%d-%d-%d %d:%d:%d]
Something went wrong with that request. Please try again.