Doc #60566 [Bgs]: Highlight that 3rd argument $matches only became optional in 5.4.0
| From: | martinb at online dot ie | Date: | Wed, 21 Dec 2011 19:16:52 +0000 |
| Subject: | Doc #60566 [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-7698@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
User updated by: martinb at online dot ie
Reported by: martinb at online dot ie
Summary: Highlight that 3rd argument $matches only became
optional in 5.4.0
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:
Did I say they shouldn't? Other changes to functions are highlighted at the top of the
document: fgetcsv is a particularly good example.
Also, is it standard to mark rejected bug reports as "Bogus"? Whether this gotcha (got me
anyhow) merits highlighting may be moot but the report is not bogus, and it's pretty
objectionable to be so labelled.
Previous Comments:
------------------------------------------------------------------------
[2011-12-21 14:29:46] bjori@php.net
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.
------------------------------------------------------------------------
[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