Re: Problem with preg_split ( 4.0.5 and CVS last version )

From: Date: Fri, 04 May 2001 16:46:20 +0000
Subject: Re: Problem with preg_split ( 4.0.5 and CVS last version )
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-53873@lists.php.net to get a copy of this message
On Fri, 04 May 2001, Renato Weiner wrote: > > Hi all, > > Look at the following code: > <? > $price = "66950"; > > $formatado = preg_split ('//', $price, 0, PREG_SPLIT_NO_EMPTY); > > $escalar = sizeof($formatado); > > echo $escalar; > ?> > > In php4.0.4pl1 the result is "5", in php4.0.5 the result is "1". > > I also tried version 1.92 in CVS of /ext/pcre/php_pcre.c but I got the > same result. > > Is this a bug or a change in design ? It was a consequence of an unrelated change. I guess Perl interprets 0 as "no limit", so we'll do the same now. -Andrei * Only 19,999 lines of C++ to my next ski trip... *

« previous php.dev (#53873) next »