Guys,

Implicit flush feature is fixed as it is supposed.

I've bitten by implicit flush bugs, that tried to destroy
top most buffer without proper destruction, _very_ hard.
(PHP executes script multiple times due to broken memory
under certain condition. I've wasted _days_ just to find
what is causing this.)
Therefore, I suppose I remember well about the original
code intention even if it does not work for nested buffers.

Problem people mentioned is there are internal functions
that are using output buffer wrongly. I've fixed var_export()
and highlight_string() so far. If you find new one, please
fix it by yourselves. Or optionally let me know, I'll
fixed them, it's matter of adding 2 lines.

Anyway, CLI ignores buffer. This one is real problem.
Any comments?

[yohgaki@dev DEV]$ sapi/cgi/php-cgi
<?php
$out = highlight_string('<?php echo "ABC; ?>', TRUE);
var_dump($out);
?>

BBBBBBBBBBBBBBBBB




Status: 200
Content-type: text/html

string(157) "<code><font color="#000000">
<font color="#0000CC">&lt;?php </font><font color="#006600">echo
</font><font color="#CC0000">"ABC; ?&gt;</font>
</font>
</code>"

BBBBBBBBBBBBBBBBB




[yohgaki@dev DEV]$ sapi/cli/php
<?php
$out = highlight_string('<?php echo "ABC; ?>', TRUE);
var_dump($out);
?>

BBBBBBBBBBBBBBBBB




string(0) ""

BBBBBBBBBBBBBBBBB




[yohgaki@dev DEV]$


See the difference? It seems CLI SAPI ignores and write to stdout directly.

--
Yasuo Ohgaki


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to