php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5164 PCRE function preg_match returns null [0] in matches
Submitted: 2000-06-21 01:27 UTC Modified: 2000-08-18 21:25 UTC
From: pzb at lightningcast dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Latest CVS (21/06/2000) OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pzb at lightningcast dot net
New email:
PHP Version: OS:

 

 [2000-06-21 01:27 UTC] pzb at lightningcast dot net
preg_matches is no longer putting the text that matches the full pattern in the 0th element of the 3rd parameter.  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-21 15:40 UTC] andrei at cvs dot php dot net
I can't reproduce this. Try:

<?
preg_match("/<(.+?)>/", "<blockquote> this", $match);
var_dump($match);
?>

For me it outputs:
array(2) {
  [0]=>
  string(12) "<blockquote>"
  [1]=>
  string(10) "blockquote"
}

 [2000-08-04 11:28 UTC] stas@php.net
please confirm that this bug still exists and provide short reproducing code.
 [2000-08-18 21:25 UTC] sniper@php.net
No feedback from user.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 19:00:02 2026 UTC