mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
22 lines
968 B
PHP
22 lines
968 B
PHP
--TEST--
|
|
highlight_string() buffering
|
|
--INI--
|
|
highlight.string=#DD0000
|
|
highlight.comment=#FF9900
|
|
highlight.keyword=#007700
|
|
highlight.default=#0000BB
|
|
highlight.html=#000000
|
|
--FILE--
|
|
<?php
|
|
$var = highlight_string("<br /><?php echo \"foo\"; ?><br />");
|
|
$var = highlight_string("<br /><?php echo \"bar\"; ?><br />", TRUE);
|
|
echo "\n[$var]\n";
|
|
?>
|
|
--EXPECT--
|
|
<code><span style="color: #000000">
|
|
<br /><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"foo"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span><br /></span>
|
|
</code>
|
|
[<code><span style="color: #000000">
|
|
<br /><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"bar"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span><br /></span>
|
|
</code>]
|