forked from xdebug/xdebug
-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
xdebug_var_dump.phpt
56 lines (53 loc) · 2.52 KB
/
xdebug_var_dump.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
--TEST--
Test for correct display with xdebug_var_dump()
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.profiler_enable=0
html_errors=1
date.timezone=Europe/Oslo
xdebug.var_display_max_children=11
xdebug.overload_var_dump=1
xdebug.file_link_format=
--FILE--
<?php
class TimeStuff {
private $timestamp;
private $user_defined;
private $self;
protected $tm;
public $date;
function __construct($ts = null)
{
$this->self = &$this;
$this->timestamp = $ts === null ? time() : $ts;
$this->user_defined = ($ts !== null);
$this->date = date("Y-m-d H:i:s T", $this->timestamp);
$this->tm = getdate($this->timestamp);
}
}
$ts1 = new TimeStuff(1092515106);
var_dump($ts1);
?>
--EXPECT--
<pre class='xdebug-var-dump' dir='ltr'>
<b>object</b>(<i>TimeStuff</i>)[<i>1</i>]
<i>private</i> 'timestamp' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>1092515106</font>
<i>private</i> 'user_defined' <font color='#888a85'>=></font> <small>boolean</small> <font color='#75507b'>true</font>
<i>private</i> 'self' <font color='#888a85'>=></font>
<i>&</i><b>object</b>(<i>TimeStuff</i>)[<i>1</i>]
<i>protected</i> 'tm' <font color='#888a85'>=></font>
<b>array</b> <i>(size=11)</i>
'seconds' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>6</font>
'minutes' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>25</font>
'hours' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>22</font>
'mday' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>14</font>
'wday' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>6</font>
'mon' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>8</font>
'year' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>2004</font>
'yday' <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>226</font>
'weekday' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'Saturday'</font> <i>(length=8)</i>
'month' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'August'</font> <i>(length=6)</i>
0 <font color='#888a85'>=></font> <small>int</small> <font color='#4e9a06'>1092515106</font>
<i>public</i> 'date' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'2004-08-14 22:25:06 CEST'</font> <i>(length=24)</i>
</pre>