Bug #3006 Updated: str_repeat messing with the output buffer?
| From: | helbockNOSPAM at secession dot com | Date: | Wed, 20 Feb 2002 11:59:16 +0000 |
| Subject: | Bug #3006 Updated: str_repeat messing with the output buffer? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-657@lists.php.net to get a copy of this message | ||
ID: 3006
Updated by: helbockNOSPAM@secession.com
Reported By: leon@leonatkinson.com
Status: Closed
Bug Type: Misbehaving function
Operating System: Windows
PHP Version: 4.0 Beta 3
New Comment:
echo strlen(str_repeat("a",3));
will output "4" on php4.0 beta 3, which proves that str_repeat
deliberately adds one character to the end of the string.
when tested with a later version (php 4.0.5) this error did not occur
anymore.
Previous Comments:
------------------------------------------------------------------------
[2000-06-09 03:39:58] zeev@cvs.php.net
No response for quite a while...
If the problem persists with 4.0.0, please submit a new bug report.
------------------------------------------------------------------------
[1999-12-20 11:58:13] andrei@cvs.php.net
I have not been able to reproduce this with the latest CVS. Could
you try it with the latest version and see if it happens?
------------------------------------------------------------------------
[1999-12-19 14:53:10] leon@leonatkinson.com
This code:
<HTML>
<HEAD>
<TITLE>str_repeat</TITLE>
</HEAD>
<BODY>
<?
print(str_repeat("PHP!<BR>\n", 10));
?>
</BODY>
</HTML>
produces this:
<HTML>
<HEAD>
<TITLE>str_repeat</TITLE>
</HEAD>
<BODY>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
PHP!<BR>
</BODY>
</HTML>
Note the extra space just before the closing body tag.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=3006&edit=1