#29279 [Fbk->NoF]: echo "0"; terminates output
| From: | php-bugs at lists dot php dot net | Date: | Wed, 04 Aug 2004 23:00:05 +0000 |
| Subject: | #29279 [Fbk->NoF]: echo "0"; terminates output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64100@lists.php.net to get a copy of this message | ||
ID: 29279
Updated by: php-bugs@lists.php.net
Reported By: milky at users dot sf dot net
-Status: Feedback
+Status: No Feedback
Bug Type: Strings related
Operating System: Linux, glibc2.3
PHP Version: 5.0.0
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2004-07-28 12:21:34] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Any log entries? Any reproduce script?
------------------------------------------------------------------------
[2004-07-20 13:47:53] milky at users dot sf dot net
Description:
------------
(Hard to reproduce.)
In one of my scripts any variant of outputting a variable set to
(string) "0" ended the output. Appearantly happened for var_dump(),
print_r(), echo() and print().
Initially it appeared to be a pcre problem:
$_SERVER["QUERY_STRING"] = "q=example&s=0&s=1&s=7";
preg_match_all('/&s=(\d+)/', $_SERVER["QUERY_STRING"], $uu);
echo implode(" ", $uu[1]);
But it probably isn't. Appears that earlier parts of any of the other
included scripts changed interpreter behaviour and lead to the strange
effect. It seems not configuration-related or to be a general bug, as
the same <?php echo "0";' ?> gives no problem in short scripts.
Only fails in CGI environment, doesn't happen on cmdline.
same effect:
- echo "0";
- echo '0';
OTH this doesn't output anything strange (binary):
- echo "1";
Not sure, if this is a bug at all. The "0" breaks also with 5rc2, 4.3.x
and down to 4.1.2 (all in -cgi/fcgi incarnation)
But btw:
echo "\000"; echo "+++";
echo "0"; echo "...";
will correctly return the ^@+++ but nothing after that.
related to #16388 ?
Reproduce code:
---------------
<?php
//...
#...
#
include("htm/head"); # contains no php code
echo "0"; # ends output
// more code follows
#... (all other code and include()s being commented out to reproduce)
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29279&edit=1