src/Utils/ArrayUtil.php
public static function paraFilter($para)
    {
        $paraFilter = [];
        foreach ($para as $key => $val) {
            if ($val === '' || $val === null) {
                continue;
            } else {
                if (!is_array($para[$key])) {
                    $para[$key] = is_bool($para[$key]) ? $para[$key] : trim($para[$key]);
                }

                $paraFilter[$key] = $para[$key];
            }
        }

        return $paraFilter;
    }
public static function paraFilter($para)
    {
        $paraFilter = [];
        foreach ($para as $key => $val) {
            if ($val === '' || $val === null) {
                continue;
            } else {
                if (!is_array($para[$key])) {
                    $para[$key] = is_bool($para[$key]) ? $para[$key] : trim($para[$key]);
                }

                $paraFilter[$key] = $para[$key];
            }
        }

        return $paraFilter;
    }
public static function paraFilter ( $ para ) { $ paraFilter = [ ] ; foreach ( $ para as $ key => $ val ) { if ( $ val === '' || $ val === null ) { continue ; } else { if ( ! is_array ( $ para [ $ key ] ) ) { $ para [ $ key ] = is_bool ( $ para [ $ key ] ) ? $ para [ $ key ] : trim ( $ para [ $ key ] ) ; } $ paraFilter [ $ key ] = $ para [ $ key ] ; } } return $ paraFilter ; }
移除空值的key
@param $para
@return array
@author helei
移除空值的key