xref: /PHP-5.3/tests/strings/004.phpt (revision 17c7d352)
1--TEST--
2highlight_string() buffering
3--INI--
4highlight.string=#DD0000
5highlight.comment=#FF9900
6highlight.keyword=#007700
7highlight.bg=#FFFFFF
8highlight.default=#0000BB
9highlight.html=#000000
10--FILE--
11<?php
12$var = highlight_string("<br /><?php echo \"foo\"; ?><br />");
13$var = highlight_string("<br /><?php echo \"bar\"; ?><br />", TRUE);
14echo "\n[$var]\n";
15?>
16--EXPECT--
17<code><span style="color: #000000">
18&lt;br&nbsp;/&gt;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>&lt;br&nbsp;/&gt;</span>
19</code>
20[<code><span style="color: #000000">
21&lt;br&nbsp;/&gt;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"bar"</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>&lt;br&nbsp;/&gt;</span>
22</code>]
23