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.
...
...
@@ -53,6 +53,30 @@
53
53
</para>
54
54
</refsect1>
55
55

56
+
<refsect1 role="changelog">
57
+
&reftitle.changelog;
58
+
<para>
59
+
<informaltable>
60
+
<tgroup cols="2">
61
+
<thead>
62
+
<row>
63
+
<entry>&Version;</entry>
64
+
<entry>&Description;</entry>
65
+
</row>
66
+
</thead>
67
+
<tbody>
68
+
<row>
69
+
<entry>8.3.0</entry>
70
+
<entry>
71
+
The resulting HTML has changed.
72
+
</entry>
73
+
</row>
74
+
</tbody>
75
+
</tgroup>
76
+
</informaltable>
77
+
</para>
78
+
</refsect1>
79
+

56
80
<refsect1 role="examples">
57
81
&reftitle.examples;
58
82
<para>
...
...
@@ -74,6 +98,12 @@ highlight_string('<?php phpinfo(); ?>');
74
98
</code>
75
99
]]>
76
100
</screen>
101
+
&example.outputs.83;
102
+
<screen>
103
+
<![CDATA[
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>
105
+
]]>
106
+
</screen>
77
107
</example>
78
108
</para>
79
109
</refsect1>
80
110