Documentation

JSON
in package

AbstractYes

An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.

Table of Contents

Methods

stringify()  : string
Converts a PHP value to a JavaScript Object Notation (JSON) string.

Methods

stringify()

Converts a PHP value to a JavaScript Object Notation (JSON) string.

public final static stringify(mixed $value[, array<int, int|string>|null $replacer = null ][, null|int|string $space = null ]) : string
Parameters
$value : mixed

A PHP value, usually an object or array, to be converted.

$replacer : array<int, int|string>|null = null

An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.

$space : null|int|string = null

Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.

Return values
string

        
On this page

Search results