File: bug00457-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 (80 lines) | stat: -rw-r--r-- 1,635 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
--TEST--
Test for bug #457: var_dump() overloading from the command line
--INI--
html_errors=0
xdebug.mode=develop
xdebug.var_display_max_data=32
xdebug.var_display_max_children=4
xdebug.var_display_max_depth=2
xdebug.cli_color=1
xdebug.filename_format=
--FILE--
<?php
$array = array(
	"A very long string that should be cut off at 32 characters",
	array(
		"a test for the depth setting",
		array(
			"this should not show"
		)
	),
	"third element",
	"fourth element (still shows)",
	"fifth element (should not show)"
);
var_dump($array);

$object = new stdClass;
$object->prop1 = "A very long string that should be cut off at 32 characters";
$object->array = array(
		"a test for the depth setting",
		array(
			"this should not show"
		)
	);
$object->prop3 = "third element";
$object->prop4 = "fourth element (still shows)";
$object->prop5 = "fifth element (should not show)";
var_dump($object);
?>
--EXPECTF--
%sbug00457-001.php:14:
array(5) {
  [0] =>
  string(58) "A very long string that should b"...
  [1] =>
  array(2) {
    [0] =>
    string(28) "a test for the depth setting"
    [1] =>
    array(1) {
      ...
    }
  }
  [2] =>
  string(13) "third element"
  [3] =>
  string(28) "fourth element (still shows)"

  (more elements)...
}
%sbug00457-001.php:27:
class stdClass#%d (5) {
  public $prop1 =>
  string(58) "A very long string that should b"...
  public $array =>
  array(2) {
    [0] =>
    string(28) "a test for the depth setting"
    [1] =>
    array(1) {
      ...
    }
  }
  public $prop3 =>
  string(13) "third element"
  public $prop4 =>
  string(28) "fourth element (still shows)"

  (more elements)...
}