Function __global->json_decode
Definitions
sources_custom/phpstub.php
- Decodes a JSON string.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $json | string | No | No | required parameter | N/A | N/A | The JSON string being decoded |
| $assoc | boolean | No | No | False | N/A | N/A | Whether returned objects will be converted into associative arrays |
| $depth | integer | No | No | 512 | N/A | N/A | User specified recursion depth |
Returns
- Decoded data (false: error)
- Type: ~mixed
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Decodes a JSON string.
*
* @param string $json The JSON string being decoded
* @param boolean $assoc Whether returned objects will be converted into associative arrays
* @param integer $depth User specified recursion depth
* @return ~mixed Decoded data (false: error)
*/
function json_decode(string $json, bool $assoc = false, int $depth = 512)
* Decodes a JSON string.
*
* @param string $json The JSON string being decoded
* @param boolean $assoc Whether returned objects will be converted into associative arrays
* @param integer $depth User specified recursion depth
* @return ~mixed Decoded data (false: error)
*/
function json_decode(string $json, bool $assoc = false, int $depth = 512)
