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.
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.