Doc #60952 [Opn->Nab]: preg_match documentation mistake
| From: | aharvey@php.net | Date: | Thu, 02 Feb 2012 08:07:47 +0000 |
| Subject: | Doc #60952 [Opn->Nab]: preg_match documentation mistake | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7898@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60952&edit=1
ID: 60952
Updated by: aharvey@php.net
Reported by: thorne51 at gmail dot com
Summary: preg_match documentation mistake
-Status: Open
+Status: Not a bug
Type: Documentation Problem
-Package: *General Issues
+Package: Documentation problem
Operating System: Windows
PHP Version: 5.3.9
Block user comment: N
Private report: N
New Comment:
No, preg_match() always returns an integer or false. The documentation is correct.
Previous Comments:
------------------------------------------------------------------------
[2012-02-02 08:02:40] thorne51 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.preg-match#refsect1-function.preg-
match-description
---
according to the documentation, preg_match returns a value of int, although it
actually returns an array.
Test script:
---------------
var_dump(preg_match('/[0-9]/','5'));
Expected result:
----------------
Please update documentation
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60952&edit=1