Bug #17901: bug in the function eregi()
| From: | akesla at gmx dot de | Date: | Fri, 21 Jun 2002 15:13:22 +0000 |
| Subject: | Bug #17901: bug in the function eregi() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-11684@lists.php.net to get a copy of this message | ||
From: akesla@gmx.de
Operating system: Linux
PHP version: 4.1.2
PHP Bug Type: Regexps related
Bug description: bug in the function eregi()
// 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
--
Edit bug report at http://bugs.php.net/?id=17901&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17901&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17901&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17901&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17901&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17901&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17901&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17901&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17901&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17901&r=globals