reference/var/functions/print-r.xml
ccc438a27bae31d71fe2ca7dc095360db5bc1af6
...
...
@@ -11,9 +11,9 @@
11
11
<refsect1 role="description">
12
12
&reftitle.description;
13
13
<methodsynopsis>
14
-
<type>mixed</type><methodname>print_r</methodname>
15
-
<methodparam><type>mixed</type><parameter>expression</parameter></methodparam>
16
-
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>false</initializer></methodparam>
14
+
<type class="union"><type>string</type><type>bool</type></type><methodname>print_r</methodname>
15
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
16
+
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>&false;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
<function>print_r</function> displays information about a variable
...
...
@@ -22,14 +22,9 @@
22
22
<para>
23
23
<function>print_r</function>, <function>var_dump</function> and
24
24
<function>var_export</function> will
25
-
also show protected and private properties of objects with PHP 5.
25
+
also show protected and private properties of objects.
26
26
Static class members will not be shown.
27
27
</para>
28
-
<para>
29
-
Remember that <function>print_r</function> will move the array
30
-
pointer to the end. Use <function>reset</function> to bring
31
-
it back to beginning.
32
-
</para>
33
28
</refsect1>
34
29

35
30
<refsect1 role="parameters">
...
...
@@ -37,7 +32,7 @@
37
32
<para>
38
33
<variablelist>
39
34
<varlistentry>
40
-
<term><parameter>expression</parameter></term>
35
+
<term><parameter>value</parameter></term>
41
36
<listitem>
42
37
<para>
43
38
The expression to be printed.
...
...
@@ -61,7 +56,7 @@
61
56
<refsect1 role="returnvalues">
62
57
&reftitle.returnvalues;
63
58
<para>
64
-
If given a <type>string</type>, <type>integer</type> or <type>float</type>,
59
+
If given a <type>string</type>, <type>int</type> or <type>float</type>,
65
60
the value itself will be printed. If given an <type>array</type>, values
66
61
will be presented in a format that shows keys and elements. Similar
67
62
notation is used for <type>object</type>s.
...
...
@@ -72,49 +67,6 @@
72
67
</para>
73
68
</refsect1>
74
69

75
-
<refsect1 role="notes">
76
-
&reftitle.notes;
77
-
&note.uses-ob;
78
-
</refsect1>
79
-

80
-
<refsect1 role="changelog">
81
-
&reftitle.changelog;
82
-
<para>
83
-
<informaltable>
84
-
<tgroup cols="2">
85
-
<thead>
86
-
<row>
87
-
<entry>&Version;</entry>
88
-
<entry>&Description;</entry>
89
-
</row>
90
-
</thead>
91
-
<tbody>
92
-
<row>
93
-
<entry>4.3.0</entry>
94
-
<entry>
95
-
The <parameter>return</parameter> parameter was added. If you need to
96
-
capture the output of <function>print_r</function> with an older
97
-
version of PHP prior, use the
98
-
<link linkend="ref.outcontrol">output-control functions</link>.
99
-
</entry>
100
-
</row>
101
-
<row>
102
-
<entry>4.0.4</entry>
103
-
<entry>
104
-
Prior to PHP 4.0.4, <function>print_r</function> will continue forever
105
-
if given an <type>array</type> or <type>object</type> that
106
-
contains a direct or indirect reference to itself. An example
107
-
is <literal>print_r($GLOBALS)</literal> because
108
-
<literal>$GLOBALS</literal> is itself a global variable that
109
-
contains a reference to itself.
110
-
</entry>
111
-
</row>
112
-
</tbody>
113
-
</tgroup>
114
-
</informaltable>
115
-
</para>
116
-
</refsect1>
117
-

118
70
<refsect1 role="examples">
119
71
&reftitle.examples;
120
72
<para>
...
...
@@ -165,6 +117,11 @@ $results = print_r($b, true); // $results now contains output from print_r
165
117
</para>
166
118
</refsect1>
167
119

120
+
<refsect1 role="notes">
121
+
&reftitle.notes;
122
+
&note.uses-ob-php70;
123
+
</refsect1>
124
+

168
125
<refsect1 role="seealso">
169
126
&reftitle.seealso;
170
127
<para>
...
...
@@ -177,7 +134,6 @@ $results = print_r($b, true); // $results now contains output from print_r
177
134
</refsect1>
178
135

179
136
</refentry>
180
-

181
137
<!-- Keep this comment at the end of the file
182
138
Local variables:
183
139
mode: sgml
184
140