collection of objects to array php code example Example: object to array php $array = (array) $yourObject;