php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63754 preg_match changelog missing entry when $matches became optional in 5.4.0
Submitted: 2012-12-13 01:55 UTC Modified: 2012-12-13 03:38 UTC
From: php dot net at web dot wnsr dot net Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2012-12-13 01:55 UTC] php dot net at web dot wnsr dot net
Description:
------------
---
From manual page: http://www.php.net/function.preg-match#refsect1-function.preg-
match-changelog
---

The function signature for preg_match indicates $matches (the third argument) is 
optional. However, it was only made optional in PHP 5.4.0:

http://php.net/ChangeLog-5.php#5.4.0
""""
Improved preg extension
Changed third parameter of preg_match_all() to optional. #53238.
""""

The changelog for this function should reflect this, so that readers still using 
versions earlier than PHP 5.4 will understand why they get errors if they 
attempt to leave off the third argument.

Expected result:
----------------
I would expect the changelog for the preg_match function documentation to show 
that the third argument was made optional in PHP 5.4.0.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-13 03:38 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2012-12-13 03:38 UTC] aharvey@php.net
It's always been optional in preg_match(); the changelog at http://php.net/preg_match_all already mentions that $matches became optional in preg_match_all() in PHP 5.4.0.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 17:00:02 2026 UTC