#36162 [Opn->Bgs]: preg_match fails to return result matches
| From: | tony2001@php.net | Date: | Thu, 26 Jan 2006 10:16:11 +0000 |
| Subject: | #36162 [Opn->Bgs]: preg_match fails to return result matches | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92497@lists.php.net to get a copy of this message | ||
ID: 36162
Updated by: tony2001@php.net
Reported By: gmarik at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: *Regular Expressions
Operating System: Win XP pro 5.1.2600 rus
PHP Version: 5.1.2
New Comment:
Set error_reporting to E_ALL|E_STRICT and you'll see the error message.
Previous Comments:
------------------------------------------------------------------------
[2006-01-26 11:12:31] gmarik at gmail dot com
Description:
------------
preg_match fails to return result matches in case matches variable gets
assigned a value in function call statement.
Reproduce code:
---------------
<?php
preg_match('/\wte/', 'teste', $m = array());
var_dump($m);
?>
Expected result:
----------------
array(1) {
[0]=>
string(3) "ste"
}
Actual result:
--------------
array(0) {
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36162&edit=1