php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78417 Description of strpos
Submitted: 2019-08-15 14:16 UTC Modified: 2021-02-23 12:52 UTC
From: vlada at skrbek dot cz Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vlada at skrbek dot cz
New email:
PHP Version: OS:

 

 [2019-08-15 14:16 UTC] vlada at skrbek dot cz
Description:
------------
---
From manual page: https://php.net/function.strpos
---

Hello

It is just a mine oppinion but I think to the description of strpos should be added the return value BOOLEAN not only INT because the return value is either INT if the string is found or BOOLEAN if the string is not find.

I like these documentations.

Also note. When I search comparator == or === it is not found. Could you fix it?

Best Regards

Test script:
---------------
It is just a mine oppinion but I think to the description of strpos should be added the return value BOOLEAN not only INT because the return value is either INT if the string is found or BOOLEAN if the string is not find.

Now it looks like:
strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) : int

I think it should be something like:
strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) : {int|boolena}



Expected result:
----------------
strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) : {int|boolena}

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-23 12:52 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-02-23 12:52 UTC] cmb@php.net
This has been fixed in the meantime.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 20:01:32 2024 UTC