From: tokul at users dot sourceforge dot net
Operating system: Linux Debian Etch
PHP version: 6CVS-2008-05-06 (snap)
PHP Bug Type: *Regular Expressions
Bug description: ereg works differently in PHP 6.0 unicode.semantics=on
Description:
------------
expressions that work in older versions fail on PHP6 unicode.semantics=on
Compared 5.2-dev, 5.3-dev and 6.0-dev snapshots
Reproduce code:
---------------
$line = "* 469 EXISTS\r\n";
if (ereg("[^ ]+ +([^ ]+) +EXISTS", $line, $match)) {
var_dump($match[1]);
} else {
var_dump(false);
}
$line = "* 469 FETCH (UID 508 BODY[1]<0> {154}\r\n";
if (ereg('\\{([^\\}]*)\\}', $line, $match)) {
var_dump($match[1]);
} else {
var_dump(false);
}
Expected result:
----------------
string(3) "469"
string(3) "154"
Actual result:
--------------
bool(false)
Warning: ereg(): REG_BADRPT in
/home/tomas/testbeds/test/php60/bin/ereg.php on line 10
bool(false)
--
Edit bug report at http://bugs.php.net/?id=44923&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44923&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44923&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44923&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44923&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44923&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44923&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44923&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44923&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44923&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44923&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44923&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44923&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44923&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44923&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44923&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44923&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44923&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44923&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44923&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44923&r=mysqlcfg