php 8 object to array code example
Example 1: object to array php
$array = (array) $yourObject;
Example 2: array to object php
$object = json_decode(json_encode($array), FALSE);
$array = (array) $yourObject;
$object = json_decode(json_encode($array), FALSE);