php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17901 bug in the function eregi()
Submitted: 2002-06-21 11:13 UTC Modified: 2002-06-21 12:21 UTC
From: akesla at gmx dot de Assigned:
Status: Closed Package: Regexps related
PHP Version: 4.1.2 OS: Linux
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: akesla at gmx dot de
New email:
PHP Version: OS:

 

 [2002-06-21 11:13 UTC] akesla at gmx dot de
// this is a test string i used
$value="i|s:24:\"Hallo Dies Ist Ein TTTst ZZZ rrr\"";

// this is the regular expression string
$s="^([a-z_]{1,})\|([a-z]{1}):([0-9]{1,}):\"(.*) (.*) (.*)\"";

eregi($s,$value,$werte);
echo "sizeof($werte): "sizeof($werte);

foreach($werte as $f) {
    echo $f."<br>";
}

// OUTPUT
sizeof($werte): 10
i|s:24:"Hello this Is A Test ZZZ rrr"
i
s
24
Hello this Is A Test
ZZZ
rrr


the is the size of the array
the size is not scaleable its fix
the size is always 10
if i use another regular expression like
$s="^([a-z_]{1,})\|([a-z]{1}):([0-9]{1,}):\"(.*) (.*) (.*) (.*) (.*) (.*) (.*)\"";
the last "rrr" is not a value of the result

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-21 12:21 UTC] sander@php.net
This should be fixed in CVS. Try a snapshot from http://snaps.php.net and reopen this report if the problem persists.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Nov 18 17:01:31 2019 UTC