Skip to content

Incorrect behaviour of mb_strpos #329

@GrahamCampbell

Description

@GrahamCampbell
<?php

var_dump(mb_strpos(null, 'a'));

should print to bool(false) and raise no errors (https://3v4l.org/YXq4M), because the mb_ functions all treat null as the empty string, by design.

On PHP 8, the symfony polyfill triggers a type error.

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