public static function only(array $arr, string ...$keys): array
    {
        $ret = [];
        foreach ($keys as $key) {
            if (isset($arr[$key])) {
                $ret[$key] = $arr[$key];
            }
        }
        return $ret;
    }
public static function only(array $arr, string ...$keys): array
    {
        $ret = [];
        foreach ($keys as $key) {
            if (isset($arr[$key])) {
                $ret[$key] = $arr[$key];
            }
        }
        return $ret;
    }
public static function only ( array $ arr , string ... $ keys ) : array { $ ret = [ ] ; foreach ( $ keys as $ key ) { if ( isset ( $ arr [ $ key ] ) ) { $ ret [ $ key ] = $ arr [ $ key ] ; } } return $ ret ; }
Selectively keep values in an array based on their keys

@param array $arr The array to operate on
@param string ...$keys The key(s) to remove from the array
@return array
Selectively keep values in an array based on their keys