|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36162 preg_match fails to return result matches
Submitted: 2006-01-26 11:12 UTC Modified: 2006-01-26 11:16 UTC
From: gmarik at gmail dot com Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: 5.1.2 OS: Win XP pro 5.1.2600 rus
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gmarik at gmail dot com
New email:
PHP Version: OS:


 [2006-01-26 11:12 UTC] gmarik at gmail dot com
preg_match fails to return result matches in case matches variable gets assigned a value in function call statement.

Reproduce code:
preg_match('/\wte/', 'teste', $m = array());

Expected result:
array(1) {
  string(3) "ste"

Actual result:
array(0) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-26 11:16 UTC]
Set error_reporting to E_ALL|E_STRICT and you'll see the error message.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 20 22:01:28 2024 UTC