Bug #52007 [Bgs]: Split function
| From: | rasmus@php.net | Date: | Sun, 06 Jun 2010 16:21:04 +0000 |
| Subject: | Bug #52007 [Bgs]: Split function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151128@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52007&edit=1
ID: 52007
Updated by: rasmus@php.net
Reported by: kannthenpalam at gmail dot com
Summary: Split function
Status: Bogus
Type: Bug
Package: *General Issues
Operating System: windows
PHP Version: Irrelevant
New Comment:
split() is deprecated because it relies on an old, slow, unmaintained
regex
library. You should be using peg_split() if you actually need to split
on a
regular expression. In your case, you are splitting on a single
character
which means you should be using explode(). Using a regex to find a
single
character makes little sense.
Previous Comments:
------------------------------------------------------------------------
[2010-06-06 16:30:15] degeberg@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2010-06-06 15:55:41] kannthenpalam at gmail dot com
Description:
------------
Now i am using 5.3.0 version of php.When i am using the split function
it will show the error as follows
Deprecated: Function split() is deprecated
the code like this
$custdate = '06-06-2010';
split("-",$custdate,3);
Test script:
---------------
$custdate = '06-06-2010';
split("-",$custdate,3);
Expected result:
----------------
i just want to know why this error is occor.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52007&edit=1