public static function explodeGeneric($input = '', array $delims = [' '])
    {
        foreach ($delims as $delim) {
            $input = str_replace($delim, ' ', $input);
        }
        $input = preg_replace('/\s\s+/', ' ', $input);
        $input = trim($input);
        $out = explode(' ', $input);
        return $out;
    }
public static function explodeGeneric($input = '', array $delims = [' '])
    {
        foreach ($delims as $delim) {
            $input = str_replace($delim, ' ', $input);
        }
        $input = preg_replace('/\s\s+/', ' ', $input);
        $input = trim($input);
        $out = explode(' ', $input);
        return $out;
    }
public static function explodeGeneric ( $ input = '' , array $ delims = [ ' ' ] ) { foreach ( $ delims as $ delim ) { $ input = str_replace ( $ delim , ' ' , $ input ) ; } $ input = preg_replace ( '/\s\s+/' , ' ' , $ input ) ; $ input = trim ( $ input ) ; $ out = explode ( ' ' , $ input ) ; return $ out ; }
Generic explode function.
@param  string $input
@param  array $delims Array containing delimiter characters.
@return array
Generic explode function .