php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60700 Confusing function return type
Submitted: 2012-01-10 16:03 UTC Modified: 2012-01-11 02:47 UTC
From: adrian at foeder dot de Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: adrian at foeder dot de
New email:
PHP Version: OS:

 

 [2012-01-10 16:03 UTC] adrian at foeder dot de
Description:
------------
---
From manual page: http://www.php.net/function.preg-match#refsect1-function.preg-match-description
---

The description says this function would return "int" only, while the Return Values section says it could return FALSE also.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-11 02:47 UTC] frozenfire@php.net
-Status: Open +Status: Bogus
 [2012-01-11 02:47 UTC] frozenfire@php.net
This isn't an error. It's standard to indicate the "working" return value in the 
function prototype, and indicate "or false on failure" in the return values 
section.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Apr 06 12:01:25 2020 UTC