why array converting to object in php code example Example: php convert array to object $object = (object) $array;