#39489 [NEW]: eregi doesn't always work

From: Date: Mon, 13 Nov 2006 08:10:29 +0000
Subject: #39489 [NEW]: eregi doesn't always work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104876@lists.php.net to get a copy of this message
From: rsarceno at yahoo dot com Operating system: Windows 2000 PHP version: 5.2.0 PHP Bug Type: *General Issues Bug description: eregi doesn't always work Description: ------------ The function eregi doesn't work if my compare string is ".info", ".name" or ".net" Reproduce code: --------------- if (eregi("[.aero]$",$domain_name)) { echo "domain is aero"; }elseif (eregi("[.com]$",$domain_name)) { echo "domain is com"; }elseif (eregi("[.info]$",$domain_name)) { echo "domain is info"; }elseif (eregi("[.name]$",$domain_name)) { echo "domain is name"; }elseif (eregi("[.net]$",$domain_name)) { echo "domain is net";} Expected result: ---------------- $domain_name = "domain.aero"; echo domain is aero $domain_name = "domain.com"; echo domain is com $domain_name = "domain.info"; echo domain is info $domain_name = "domain.name"; echo domain is name $domain_name = "domain.net"; echo domain is name Actual result: -------------- $domain_name = "domain.aero"; echo domain is aero $domain_name = "domain.com"; echo domain is com $domain_name = "domain.info"; echo $domain_name = "domain.name"; echo $domain_name = "domain.net"; echo -- Edit bug report at http://bugs.php.net/?id=39489&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39489&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39489&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39489&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39489&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39489&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39489&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39489&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39489&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39489&r=support Expected behavior: http://bugs.php.net/fix.php?id=39489&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39489&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39489&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39489&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39489&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39489&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39489&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39489&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39489&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39489&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39489&r=mysqlcfg

« previous php.bugs (#104876) next »