From: estudiosima at gmail dot com
Operating system: ubuntu 8.04
PHP version: 5.2.10
PHP Bug Type: *General Issues
Bug description: error in response
Description:
------------
if the string have a space in the begin of the string, takes the space as
a word.
Reproduce code:
---------------
---
>From manual page: function.explode
---
<?
phpinfo();
$a = " word1 word2";
$b = explode(" ",$a);
print_r($b);
print "<br>".count($b);
/* result:
Array ( [0] => [1] => word1 [2] => word2 )
3
*/
?>
Expected result:
----------------
Array ( [0]=>word1 [1]=>word2 )
Actual result:
--------------
Array ( [0] => [1] => word1 [2] => word2 )
--
Edit bug report at http://bugs.php.net/?id=48692&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48692&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48692&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48692&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48692&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48692&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48692&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48692&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48692&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48692&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48692&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48692&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48692&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48692&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48692&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48692&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48692&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48692&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48692&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48692&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48692&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48692&r=mysqlcfg