toAssociativeArray.php
Table of Contents
Functions
- toAssociativeArray() : array<string|int, mixed>
- Recursively converts an object (or array) into a full associative array.
Functions
toAssociativeArray()
Recursively converts an object (or array) into a full associative array.
toAssociativeArray(array<string|int, mixed>|object $document) : array<string|int, mixed>
This function handles nested objects, ensuring the entire array or object tree is converted.
Note that only public properties of the object will be included in the resulting array.
Parameters
- $document : array<string|int, mixed>|object
-
An array or object to convert to a deep associative array .
Tags
Return values
array<string|int, mixed> —The resulting associative array.