Skip to content

Function explode() returns non-empty array for positive $limit #3596

@janpecha

Description

@janpecha

Bug report

Function explode() returns empty array only if parameter $limit is negative, in other cases it's always non-empty array.

https://www.php.net/manual/en/function.explode.php

Code snippet that reproduces the problem

https://phpstan.org/r/decb3977-0e29-4bbf-bd7d-aaaf4fd3fd0e

Expected output

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions