Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Distinguish number between int and float #19

@chriskapp

Description

@chriskapp

Hi, I have the case where I define javascript code which defines a number and on the PHP side I have to differentiate whether the value is an int or float. At the moment all defined numbers are float. I have looked a bit in the source and the check whether to return an integer or float from a number is already implemented (php_v8_value.cc:268) but commented. Do you have plans to activate this detection? Otherwise I have to perform this check on the PHP side with something like strpos('.', $value) === false ? (int) $value : $value which I think is not the best solution.

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