php8.5
Home/ Manual/ spl / splfixedarray/ SplFixedArray::jsonSerialize

SplFixedArray::jsonSerialize

PHP function Edit on GitHub ✎

(PHP 8 >= 8.1.0)

Returns a representation that can be converted to JSON

Description

SplFixedArray::jsonSerialize(): array

Serializes the array to a value that can be serialized natively by json_encode().

Parameters Parameters

Return Values

Returns array data which can be serialized by json_encode(), which is a value of any type other than a Resource.

Source: reference/spl/splfixedarray/jsonserialize.xml · from the official PHP manual (php/doc-en)