php arraylist casting with list with objects code example Example: object to array php $array = (array) $yourObject;