|
43 | 43 | <refsect1 role="returnvalues">
|
44 | 44 | &reftitle.returnvalues;
|
45 | 45 | <para>
|
46 |
| - Possible values for the returned string are: |
| 46 | + Possible values for the returned &string; are: |
47 | 47 |
|
48 | 48 | <informaltable>
|
49 | 49 | <tgroup cols="2">
|
|
63 | 63 | <entry>-</entry>
|
64 | 64 | </row>
|
65 | 65 | <row>
|
66 |
| - <entry>Booleans (true or false)</entry> |
| 66 | + <entry>Booleans (&true; or &false;)</entry> |
67 | 67 | <entry>
|
68 | 68 | <literal>"bool"</literal>
|
69 | 69 | </entry>
|
|
109 | 109 | <entry>
|
110 | 110 | <literal>"resource (closed)"</literal>
|
111 | 111 | </entry>
|
112 |
| - <entry>Example: A file stream after being closed with fclose.</entry> |
| 112 | + <entry>Example: A file stream after being closed with <function>fclose</function>.</entry> |
113 | 113 | </row>
|
114 | 114 | <row>
|
115 | 115 | <entry>Objects from Named Classes</entry>
|
|
124 | 124 | <literal>"class@anonymous"</literal> or parent class name/interface name if the class extends another class or implements an interface e.g. <literal>"Foo\Bar@anonymous"</literal>
|
125 | 125 | </entry>
|
126 | 126 | <entry>
|
127 |
| - Anonymous classes are those created through the $x = new class { ... } syntax |
| 127 | + Anonymous classes are those created through the <code>$x = new class { ... }</code> syntax |
128 | 128 | </entry>
|
129 | 129 | </row>
|
130 | 130 | </tbody>
|
|
142 | 142 | <programlisting role="php">
|
143 | 143 | <![CDATA[
|
144 | 144 | <?php
|
145 |
| -echo get_debug_type(null) . PHP_EOL; |
146 |
| -echo get_debug_type(true) . PHP_EOL; |
147 |
| -echo get_debug_type(1) . PHP_EOL; |
148 |
| -echo get_debug_type(0.1) . PHP_EOL; |
149 |
| -echo get_debug_type("foo") . PHP_EOL; |
150 |
| -echo get_debug_type([]) . PHP_EOL; |
| 145 | +
|
| 146 | +namespace Foo; |
| 147 | +
|
| 148 | +echo get_debug_type(null), PHP_EOL; |
| 149 | +echo get_debug_type(true), PHP_EOL; |
| 150 | +echo get_debug_type(1), PHP_EOL; |
| 151 | +echo get_debug_type(0.1), PHP_EOL; |
| 152 | +echo get_debug_type("foo"), PHP_EOL; |
| 153 | +echo get_debug_type([]), PHP_EOL; |
151 | 154 |
|
152 | 155 | $fp = fopen(__FILE__, 'rb');
|
153 |
| -echo get_debug_type($fp) . PHP_EOL; |
| 156 | +echo get_debug_type($fp), PHP_EOL; |
154 | 157 |
|
155 | 158 | fclose($fp);
|
156 |
| -echo get_debug_type($fp) . PHP_EOL; |
| 159 | +echo get_debug_type($fp), PHP_EOL; |
157 | 160 |
|
158 |
| -echo get_debug_type(new stdClass) . PHP_EOL; |
159 |
| -echo get_debug_type(new class {}) . PHP_EOL; |
| 161 | +echo get_debug_type(new \stdClass), PHP_EOL; |
| 162 | +echo get_debug_type(new class {}), PHP_EOL; |
160 | 163 |
|
161 |
| -namespace Foo; |
| 164 | +interface A {} |
| 165 | +interface B {} |
| 166 | +class C {} |
| 167 | +
|
| 168 | +echo get_debug_type(new class implements A {}), PHP_EOL; |
| 169 | +echo get_debug_type(new class implements A,B {}), PHP_EOL; |
| 170 | +echo get_debug_type(new class extends C {}), PHP_EOL; |
| 171 | +echo get_debug_type(new class extends C implements A {}), PHP_EOL; |
162 | 172 |
|
163 |
| -echo get_debug_type(new class implements A {}) . PHP_EOL; |
164 |
| -echo get_debug_type(new class implements A,B {}) . PHP_EOL; |
165 |
| -echo get_debug_type(new class extends C {}) . PHP_EOL; |
166 |
| -echo get_debug_type(new class extends C implements A {}) . PHP_EOL; |
167 | 173 | ?>
|
168 | 174 | ]]>
|
169 | 175 | </programlisting>
|
|
0 commit comments