Bug #51892 [NEW]: preg_match_all forces the use of a $matches variable
| From: | hugo at ankarloo dot nu | Date: | Sun, 23 May 2010 15:42:35 +0000 |
| Subject: | Bug #51892 [NEW]: preg_match_all forces the use of a $matches variable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-150741@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.2.13
Package: *General Issues
Bug Type: Bug
Bug description:preg_match_all forces the use of a $matches variable
Description:
------------
If you use preg_match_all and are only interested in the return value (i.e.
you are not interested in the data stored in $matches) you are still forced
to declare a variable for $matches.
I'm not sure if this is a bug in preg_match_all or in php's
passed_by_reference.
My first thought was to pipe $matches to a php-equivalent of /dev/null, but
something like that doesn't exist to my knowledge.
--
Edit bug report at http://bugs.php.net/bug.php?id=51892&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51892&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51892&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51892&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51892&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51892&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51892&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51892&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51892&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51892&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51892&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51892&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51892&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51892&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51892&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51892&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51892&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51892&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51892&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51892&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51892&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51892&r=mysqlcfg