Skip to content

False positive for substr() #27

Closed
Closed
@jrmajor

Description

@jrmajor

substr(), mb_substr(), iconv_substr() and grapheme_substr() now consistently clamp out-of-bounds offsets to the string boundary. Previously, false was returned instead of the empty string in some cases.

According to PHP 8.0 migration guide, calls to these four functions should no longer trigger PHPStan errors on PHP >=8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions