getJsonType.php
Table of Contents
Functions
- getJsonType() : string
- Get JSON type of a PHP value.
Functions
getJsonType()
Get JSON type of a PHP value.
getJsonType(mixed $value[, string $default = 'unknown' ]) : string
Parameters
- $value : mixed
-
The value to evaluates.
- $default : string = 'unknown'
-
The default return value if the type is not a valid JSON type.
Tags
Return values
string —One of 'null', 'boolean', 'integer', 'number', 'string', 'array', 'object', or $default.