Doc #60566 [NEW]: Highlight that 3rd argument $matches only became optional in 5.4.0

From: Date: Mon, 19 Dec 2011 20:17:05 +0000
Subject: Doc #60566 [NEW]: Highlight that 3rd argument $matches only became optional in 5.4.0
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7685@lists.php.net to get a copy of this message
From:             
Operating system: Ubuntu 10.04
PHP version:      Irrelevant
Package:          Documentation problem
Bug Type:         Documentation Problem
Bug description:Highlight that 3rd argument $matches only became optional in 5.4.0

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 bug report at https://bugs.php.net/bug.php?id=60566&edit=1
-- 
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=60566&r=trysnapshot54
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=60566&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=60566&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=60566&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60566&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=60566&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=60566&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=60566&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=60566&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=60566&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=60566&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=60566&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=60566&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=60566&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=60566&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60566&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=60566&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=60566&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=60566&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=60566&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=60566&r=mysqlcfg



Thread (8 messages)

« previous php.doc.bugs (#7685) next »