public static function containsMultipleTypes(array $array): bool
    {
        if (count($array) > 0) {
            reset($array);
            $previousType = gettype(current($array));
            next($array);
            foreach ($array as $value) {
                if ($previousType !== gettype($value)) {
                    return true;
                }
            }
        }
        return false;
    }
public static function containsMultipleTypes(array $array): bool
    {
        if (count($array) > 0) {
            reset($array);
            $previousType = gettype(current($array));
            next($array);
            foreach ($array as $value) {
                if ($previousType !== gettype($value)) {
                    return true;
                }
            }
        }
        return false;
    }
public static function containsMultipleTypes ( array $ array ) : bool { if ( count ( $ array ) > 0 ) { reset ( $ array ) ; $ previousType = gettype ( current ( $ array ) ) ; next ( $ array ) ; foreach ( $ array as $ value ) { if ( $ previousType !== gettype ( $ value ) ) { return true ; } } } return false ; }
Returns true if the given array contains elements of varying types

@param array $array
@return boolean
Returns true if the given array contains elements of varying types