php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67613 Inconsistency in the documentation
Submitted: 2014-07-14 00:22 UTC Modified: 2015-03-25 20:25 UTC
From: zuires at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zuires at gmail dot com
New email:
PHP Version: OS:

 

 [2014-07-14 00:22 UTC] zuires at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.stripos
---

Stripos returns eiter an integer or boolean, just like strpos. While strpos claims to return "mixed," stripos claims to return an integer. It is a little inconsistency which should be perhaps corrected so that same return values both have an equivalent return type in the documentation. 


Test script:
---------------
mixed strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )


Patches

doc-bug-67613.patch (last revision 2015-03-25 20:20 UTC by patrick dot schwisow at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-22 22:17 UTC] james at notjam dot es
According to the svn revision that changed that in stripos:

> False doesn't cause mixed (howto/working)
 [2015-03-25 20:24 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=336195
Log: Document stripos() as returning mixed, since it does.

Fixes doc bug #67613 (Inconsistency in the documentation); patch by Patrick
Schwisow.
 [2015-03-25 20:25 UTC] aharvey@php.net
-Status: Open +Status: Closed -Package: Strings related +Package: Documentation problem -Assigned To: +Assigned To: aharvey
 [2015-03-25 20:25 UTC] aharvey@php.net
Applied the second version of the patch (which changes stripos(), rather than strpos()), after discussion on IRC.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC