Bug #10669 Updated: Problem with preg_split

From: Date: Mon, 06 Aug 2001 17:11:08 +0000
Subject: Bug #10669 Updated: Problem with preg_split
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-62318@lists.php.net to get a copy of this message
ID: 10669 Updated by: andrei Reported By: reweiner@yahoo.com Old Status: Open Status: Closed Bug Type: PCRE related Operating System: Linux-2.2.19 PHP Version: 4.0.5 New Comment: This should work in 4.0.6 and later. Previous Comments: ------------------------------------------------------------------------ [2001-05-04 11:48:56] reweiner@yahoo.com Look at the following code: <? $price = "66950"; $formatado = preg_split ('//', $price, 0, PREG_SPLIT_NO_EMPTY); $formatado_reverso = array_reverse ($formatado ); $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 ? Thanks Renato - Brasil. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=10669&edit=1

« previous php.dev (#62318) next »