File: vardump-overload-cli-001.phpt

package info (click to toggle)
xdebug 3.4.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,096 kB
  • sloc: ansic: 19,944; php: 6,217; xml: 4,172; pascal: 534; makefile: 4; sh: 2
file content (94 lines) | stat: -rw-r--r-- 1,658 bytes parent folder | download
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--TEST--
Test for overloaded var_dump() on the CLI
--INI--
xdebug.mode=develop
html_errors=0
xdebug.cli_color=0
xdebug.var_display_max_data=32
xdebug.var_display_max_depth=2
xdebug.var_display_max_children=8
--FILE--
<?php
$array = array(
	"Hello, this is a very long string with some other useful info",
	array(
		"depth2" => array(
			"depth3" => array(
				"depth4" => false,
			)
		)
	),
	range(0, 16)
);
var_dump($array);

ini_set('xdebug.cli_color', 2);
var_dump($array);
?>
--EXPECTF--
%svardump-overload-cli-001.php:13:
array(3) {
  [0] =>
  string(61) "Hello, this is a very long strin"...
  [1] =>
  array(1) {
    'depth2' =>
    array(1) {
      ...
    }
  }
  [2] =>
  array(17) {
    [0] =>
    int(0)
    [1] =>
    int(1)
    [2] =>
    int(2)
    [3] =>
    int(3)
    [4] =>
    int(4)
    [5] =>
    int(5)
    [6] =>
    int(6)
    [7] =>
    int(7)

    (more elements)...
  }
}
%svardump-overload-cli-001.php:16:
array(3) {
  [0] =>
  string(61) "Hello, this is a very long strin"...
  [1] =>
  array(1) {
    'depth2' =>
    array(1) {
      ...
    }
  }
  [2] =>
  array(17) {
    [0] =>
    int(0)
    [1] =>
    int(1)
    [2] =>
    int(2)
    [3] =>
    int(3)
    [4] =>
    int(4)
    [5] =>
    int(5)
    [6] =>
    int(6)
    [7] =>
    int(7)

    (more elements)...
  }
}