Skip to content

intval returns unxpected result for string with "." and "e" which is not documented. #5019

@Sunvas

Description

@Sunvas
echo intval('42.'); //42     ok
echo intval('42.42'); //42     ok
echo intval('42.42e'); //42    ok
echo intval('42.42e42'); //9223372036854775807

From manual page: https://php.net/function.intval

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