PHP 4.0 Bug #8129: ereg returns incorrect results
| From: | scion at webrelay dot net | Date: | Tue, 05 Dec 2000 23:15:36 +0000 |
| Subject: | PHP 4.0 Bug #8129: ereg returns incorrect results | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40177@lists.php.net to get a copy of this message | ||
From: scion@webrelay.net
Operating system: Solaris 2.6
PHP version: 4.0.3pl1
PHP Bug Type: Regexps related
Bug description: ereg returns incorrect results
<?php
$str[] = "Makefile";
$str[] = "makefile";
$str[] = "..";
$str[] = "X-picturev";
$regexp = "^[a-z]";
while ( list( $key, $e) = each($str) ){
if( ereg( $e, $regexp))
echo "$e is lower<br>";
else
echo "$e is UPPER<br>";
}
?>
confugured --regex=pcre
http://tbiz.webrelay.net/test/ereg.php will
illustrate the
bug and show phpinfo();
Also php4.0pl1 with OpenBSD with -regex=php will behave similarly.
--
Edit Bug report at: http://bugs.php.net/?id=8129&edit=1