Bug #10314 Updated: split() function is'nt stable
| From: | sander@php.net | Date: | Sat, 10 Nov 2001 13:43:26 +0000 |
| Subject: | Bug #10314 Updated: split() function is'nt stable | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69964@lists.php.net to get a copy of this message | ||
ID: 10314
Updated by: sander
Reported By: ttttntl@yahoo.com
Old Status: Feedback
Status: Closed
Bug Type: Arrays related
Operating System: Linux Redhat 7
PHP Version: 4.0.4pl1
New Comment:
No feedback. Closing.
Previous Comments:
------------------------------------------------------------------------
[2001-10-20 23:48:03] sniper@php.net
Does this happen with latest CVS snapshot from http://snaps.php.net/ (or even with PHP 4.0.6 ?)
------------------------------------------------------------------------
[2001-04-13 01:15:20] ttttntl@yahoo.com
Hi,
I use split function to seprate two parts of a .php file content(size 6KB), but the second array
variable some times includes extra strange characters at the end. These characters are not in the
string content!
Ex:
$globalcontent=fread($dfile, filesize($globalfile));
$array = split("startreplace(.*)endreplace", $globalcontent);
echo htmlentities($array[0])."<br><font
color=red>------<br></font>".htmlentities($array[1]);
----------------
The first time running split() almost return result exactly, but when I re-run the script file, each
time re-run, it adds some strange charaters into the end value of the second variable ($array[1])
- end of content of $globalcontent is "?>"
- but end of content of $array[1] some times is "?>gu", another time is "?>
i", ...
----------------
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=10314&edit=1