#33378 [NEW]: The explode() function doesn't work properly when using "+" as the separator
| From: | mbrown at dxsonline dot com | Date: | Fri, 17 Jun 2005 03:02:51 +0000 |
| Subject: | #33378 [NEW]: The explode() function doesn't work properly when using "+" as the separator | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-80502@lists.php.net to get a copy of this message | ||
From: mbrown at dxsonline dot com
Operating system: Windows XP Service Pack 2
PHP version: 5.0.4
PHP Bug Type: Output Control
Bug description: The explode() function doesn't work properly when using "+" as the
separator
Description:
------------
The explode() function will not properly separate strings that are
separated by plus signs (+). It will put all of the string into the first
array element separated by spaces.
Reproduce code:
---------------
$toExplode = "1+1+1+1";
$exploded = explode("+", $toExplode);
foreach($exploded as $e) {
echo "Bug: ".$e."<br />"; }
Expected result:
----------------
Bug: 1
Bug: 1
Bug: 1
Bug: 1
Actual result:
--------------
Bug: 1 1 1 1
--
Edit bug report at http://bugs.php.net/?id=33378&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33378&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33378&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33378&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33378&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33378&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33378&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33378&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33378&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33378&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33378&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33378&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33378&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33378&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33378&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33378&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33378&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33378&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33378&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33378&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33378&r=mysqlcfg