public static function moveValues(array $keys, array &$from, array $to, $force = false)
    {
        foreach ($keys as $key) {
            if (isset($from[$key])) {
                $value = self::popValue($key, $from);
                if ($force || !isset($to[$key])) {
                    $to[$key] = $value;
                    unset($from[$key]);
                }
            }
        }
        return $to;
    }
public static function moveValues(array $keys, array &$from, array $to, $force = false)
    {
        foreach ($keys as $key) {
            if (isset($from[$key])) {
                $value = self::popValue($key, $from);
                if ($force || !isset($to[$key])) {
                    $to[$key] = $value;
                    unset($from[$key]);
                }
            }
        }
        return $to;
    }
public static function moveValues ( array $ keys , array & $ from , array $ to , $ force = false ) { foreach ( $ keys as $ key ) { if ( isset ( $ from [ $ key ] ) ) { $ value = self :: popValue ( $ key , $ from ) ; if ( $ force || ! isset ( $ to [ $ key ] ) ) { $ to [ $ key ] = $ value ; unset ( $ from [ $ key ] ) ; } } } return $ to ; }
Moves the given values from one array to another.
@param array $keys the keys to move.
@param array $from the array to move from.
@param array $to the array to move to.
@param boolean $force whether to allow overriding of existing values.
@return array the options.
Moves the given values from one array to another .