|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49644 explode() does not work in this case
Submitted: 2009-09-23 13:39 UTC Modified: 2009-09-24 19:29 UTC
From: iddover at gmail dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.3.0 OS: Centos 5.2
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.
Block user comment
Status: Assign to:
Bug Type:
From: iddover at gmail dot com
New email:
PHP Version: OS:


 [2009-09-23 13:39 UTC] iddover at gmail dot com
Explode doesn't works in this case

Reproduce code:
$boundary = "--========/4ab98633000bec76/";
$content = file_get_contents('merda.eml.txt');

print_r( explode($boundary, $content));


Expected result:
To explode into array?

Actual result:
Array with only 1 element


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-23 16:20 UTC]
And what might that file contain?
 [2009-09-24 18:20 UTC] iddover at gmail dot com
I think is not the only case,
 [2009-09-24 19:29 UTC]
Thank you for your bug report.

The behavior you report is not a bug. The boundary you specify simply does not occurs in the file. Note that explode() is case sensitive. The boundary in the file is uppercase, and in your variable it is lowercase.

// In file:  --========/4AB98633000BEC76/
$boundary = "--========/4ab98633000bec76/";
Different:               ^^        ^^^
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 09:01:29 2024 UTC