Re: [PHP4BETA] split() behavior
| From: | Stig Bakken | Date: | Thu, 27 May 1999 09:08:05 +0000 |
| Subject: | Re: [PHP4BETA] split() behavior | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-1120@lists.php.net to get a copy of this message | ||
On Wed, 26 May 1999, Andrey Zmievski wrote:
> I'm working on preg_split now and wanted to clarify one thing. In the
> current version, if the string to be split has the defining regex at
> the very beginning, then the first value of the returned array will be
> an empty string. I've always wondered if it's really that useful.
> Couldn't it just be skipped?
Then how would you know the difference of the strings " a b c" and "a b c"
if splitting on whitespace? IMHO, implode on the results of an implode
should return the same string as the one you split up (providing that the
delimiters are all the same in the string, of course).
- Stig
--
PHP 4 Beta