php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10669 Problem with preg_split
Submitted: 2001-05-04 11:48 UTC Modified: 2001-08-06 13:11 UTC
From: reweiner at yahoo dot com Assigned:
Status: Closed Package: PCRE related
PHP Version: 4.0.5 OS: Linux-2.2.19
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: reweiner at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-05-04 11:48 UTC] reweiner at yahoo dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-06 13:11 UTC] andrei@php.net
This should work in 4.0.6 and later.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Feb 23 08:01:25 2019 UTC