PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PHP » PHP_Compat » Bug #5049

function strripos does not report (int)0

Details

Submitted2005-08-10 03:21 UTC
Fromdillchuk at gmail dot com
Assignedaidan
StatusClosed
PackagePHP_Compat
PHP Version4.4.1
Roadmaps(Not assigned)

Comments

[2005-08-10 03:21 UTC] dillchuk at gmail dot com

Description:
------------
Compat 1.4.1

function strripos:

When haystack contains needle and should report index 0 (say, when haystack='testing' and needle='test'), FALSE is returned instead.

Test script:
---------------
// yields bool(false) instead of int(0)
var_dump( strripos( "testing", "test" ) );

// yields int(1)
var_dump( strripos( "atesting", "test" ) );

Expected result:
----------------
int(0)
int(1)

Actual result:
--------------
bool(false)
int(1)