reference/misc/functions/highlight-string.xml
443d81b33e6537a000cc235c2a11748ba8d56232
...
...
@@ -9,9 +9,9 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>mixed</type><methodname>highlight_string</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
14
-
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>false</initializer></methodparam>
12
+
<type class="union"><type>string</type><type>bool</type></type><methodname>highlight_string</methodname>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>&false;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<simpara>
17
17
Outputs or returns html markup for a syntax highlighted version of the given PHP code
...
...
@@ -24,7 +24,7 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>str</parameter></term>
27
+
<term><parameter>string</parameter></term>
28
28
<listitem>
29
29
<para>
30
30
The PHP code to be highlighted. This should include the opening tag.
...
...
@@ -66,9 +66,9 @@
66
66
</thead>
67
67
<tbody>
68
68
<row>
69
-
<entry>4.2.0</entry>
69
+
<entry>8.3.0</entry>
70
70
<entry>
71
-
The <parameter>return</parameter> parameter was added.
71
+
The resulting HTML has changed.
72
72
</entry>
73
73
</row>
74
74
</tbody>
...
...
@@ -89,26 +89,19 @@ highlight_string('<?php phpinfo(); ?>');
89
89
?>
90
90
]]>
91
91
</programlisting>
92
-
<para>
93
-
The above example will output (in PHP 4):
94
-
</para>
92
+
&example.outputs;
95
93
<screen>
96
94
<![CDATA[
97
-
<code><font color="#000000">
98
-
<font color="#0000BB">&lt;?php phpinfo</font><font color="#007700">(); </font><font color="#0000BB">?&gt;</font>
99
-
</font>
95
+
<code><span style="color: #000000">
96
+
<span style="color: #0000BB">&lt;?php phpinfo</span><span style="color: #007700">(); </span><span style="color: #0000BB">?&gt;</span>
97
+
</span>
100
98
</code>
101
99
]]>
102
100
</screen>
103
-
<para>
104
-
The above example will output (in PHP 5):
105
-
</para>
101
+
&example.outputs.83;
106
102
<screen>
107
103
<![CDATA[
108
-
<code><span style="color: #000000">
109
-
<span style="color: #0000BB">&lt;?php phpinfo</span><span style="color: #007700">(); </span><span style="color: #0000BB">?&gt;</span>
110
-
</span>
111
-
</code>
104
+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php phpinfo</span><span style="color: #007700">(); </span><span style="color: #0000BB">?&gt;</span></code></pre>
112
105
]]>
113
106
</screen>
114
107
</example>
115
108