Function __global->json_encode
Definitions
sources_custom/phpstub.php
- Returns the JSON representation of a value.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $value | mixed | No | No | required parameter | N/A | N/A | The value being encoded. Can be any type except a resource. |
| $options | integer | No | No | 0 | N/A | N/A | Bitmask of options |
Returns
- Encoded data
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Returns the JSON representation of a value.
*
* @param mixed $value The value being encoded. Can be any type except a resource.
* @param integer $options Bitmask of options
* @return string Encoded data
*/
function json_encode($value, int $options = 0) : string
* Returns the JSON representation of a value.
*
* @param mixed $value The value being encoded. Can be any type except a resource.
* @param integer $options Bitmask of options
* @return string Encoded data
*/
function json_encode($value, int $options = 0) : string
