You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converts a PHP object or multi-dimensional object structure into an associative array.
This method dynamically handles nested data structures:
Objects: Object properties are extracted and converted into associative array keys and values.
Nested Structures: Iterates recursively through properties and array elements, converting any nested objects into arrays while preserving multi-dimensional array structures.
Usage
objectToArray(array|object $object): array
Parameters
object (array|object)
: The object (or array containing objects) to convert.
Return Value
(array)
: Returns a fully converted associative array (or multi-dimensional array) containing the extracted object properties and values.