public static function isIterator($arr) {
        if (!is_array($arr)) {
            return false;
        }

        foreach (array_keys($arr) as $key) {
            if (!is_numeric($key)) {
                return false;
            }
        }

        return true;
    }
public static function isIterator($arr) {
        if (!is_array($arr)) {
            return false;
        }

        foreach (array_keys($arr) as $key) {
            if (!is_numeric($key)) {
                return false;
            }
        }

        return true;
    }
public static function isIterator ( $ arr ) { if ( ! is_array ( $ arr ) ) { return false ; } foreach ( array_keys ( $ arr ) as $ key ) { if ( ! is_numeric ( $ key ) ) { return false ; } } return true ; }
Check if param is an array and can be iterated on,
indicating this is a collection

@param object $arr

@return boolean
Check if param is an array and can be iterated on indicating this is a collection