php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10314 split() function is'nt stable
Submitted: 2001-04-13 01:15 UTC Modified: 2001-11-10 08:43 UTC
From: ttttntl at yahoo dot com Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.0.4pl1 OS: Linux Redhat 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ttttntl at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-04-13 01:15 UTC] ttttntl at yahoo dot 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", ...
----------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-20 23:48 UTC] sniper@php.net
Does this happen with latest CVS snapshot from http://snaps.php.net/ (or even with PHP 4.0.6 ?)

 [2001-11-10 08:43 UTC] sander@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC