(PECL simdjson >= 2.0.0)

simdjson_key_countReturns the value at a JSON pointer.


    string $json,
    string $key,
    int $depth = 512,
    bool $throw_if_uncountable = false
): int

Count the number of elements of the object/array found at the requested JSON pointer.

Bağımsız Değişkenler


The json string being queried.


The JSON pointer string.


Maximum nesting depth of the structure being validated. The value must be greater than 0, and less than or equal to 2147483647. Callers should use reasonably small values, because larger depths require more buffer space and will increase the recursion depth, unlike the current json_decode() implementation.


When true, a SimdJsonException will be thrown instead of returning 0 when the value the JSON pointer points to is neither an object nor an array.

Dönen Değerler

Returns an int with the number of elements of the value at the given JSON pointer.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top