Doc #60566 [Opn->Bgs]: Highlight that 3rd argument $matches only became optional in 5.4.0
| From: | bjori@php.net | Date: | Wed, 21 Dec 2011 14:29:46 +0000 |
| Subject: | Doc #60566 [Opn->Bgs]: Highlight that 3rd argument $matches only became optional in 5.4.0 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7689@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60566&edit=1
ID: 60566
Updated by: bjori@php.net
Reported by: martinb at online dot ie
Summary: Highlight that 3rd argument $matches only became
optional in 5.4.0
-Status: Open
+Status: Bogus
Type: Documentation Problem
Package: Documentation problem
Operating System: Ubuntu 10.04
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
No, all changes to functions are described as changelog entries
See http://www.php.net/manual/en/about.phpversions.php
for more details on which
versions we document.
Previous Comments:
------------------------------------------------------------------------
[2011-12-19 20:17:05] martinb at online dot ie
Description:
------------
---
From manual page: http://www.php.net/function.preg-match-all#refsect1-function.preg-match-all-description
---
The fact that the 3rd argument matches was not optional before 5.4.0 needs to be highlighted at the
top the documentation, not buried in the change log.
Test script:
---------------
<?php
// PHP 5.3.2
if (preg_match_all('/a/', 'aaa') === false) error_log("returns
false");
?>
Expected result:
----------------
Nothing
Actual result:
--------------
PHP Warning: preg_match_all() expects at least 3 parameters, 2 given in /var/www/noname/test.php on
line 3
PHP Stack trace:
PHP 1. {main}() /var/www/noname/test.php:0
PHP 2. preg_match_all() /var/www/noname/test.php:3
returns false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60566&edit=1