#49673 [NEW]: preg_match_all returns false when third arument is omitted

From: Date: Fri, 25 Sep 2009 19:22:46 +0000
Subject: #49673 [NEW]: preg_match_all returns false when third arument is omitted
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142893@lists.php.net to get a copy of this message
From: mfthemon at gmail dot com Operating system: win2k7server PHP version: 5.3.0 PHP Bug Type: PCRE related Bug description: preg_match_all returns false when third arument is omitted Description: ------------ preg_match_all doesn't return matches count when the third argument is omitted. Reproduce code: --------------- var_dump(preg_match_all('/b\([\w\W]*?\)/', 'b(2)b(4)b(5)b(8)b(2)b(18)')); Expected result: ---------------- int(6) Actual result: -------------- bool(false) -- Edit bug report at http://bugs.php.net/?id=49673&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49673&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49673&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49673&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49673&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49673&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49673&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49673&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49673&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49673&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49673&r=support Expected behavior: http://bugs.php.net/fix.php?id=49673&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49673&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49673&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49673&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49673&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49673&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49673&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49673&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49673&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49673&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49673&r=mysqlcfg

« previous php.bugs (#142893) next »