Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Add JSON_NUMERIC_CHECK to convert strings to numerics #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anwell
Copy link

@anwell anwell commented Aug 6, 2017

Many PHP database driver implementations return all query results as strings and do not do any type conversion. This is usually insignificant because PHP will perform implicit type conversions when necessary.

But for React/JSON we need these types to be explicit. The JSON_NUMERIC_CHECK flag for json_encode will detect strings that are like numbers and convert them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant