Bug #51892 [Opn->Bgs]: preg_match_all forces the use of a $matches variable
| From: | degeberg@php.net | Date: | Sun, 23 May 2010 16:13:28 +0000 |
| Subject: | Bug #51892 [Opn->Bgs]: preg_match_all forces the use of a $matches variable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150742@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51892&edit=1
ID: 51892
Updated by: degeberg@php.net
Reported by: hugo at ankarloo dot nu
Summary: preg_match_all forces the use of a $matches variable
-Status: Open
+Status: Bogus
Type: Bug
Package: *General Issues
Operating System: Linux
PHP Version: 5.2.13
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Use preg_match().
http://php.net/preg_match
Previous Comments:
------------------------------------------------------------------------
[2010-05-23 17:42:34] hugo at ankarloo dot nu
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 this bug report at http://bugs.php.net/bug.php?id=51892&edit=1