public static function pull(&$array, $key, $default = null)
    {
        if (array_key_exists($key, $array)) {
            $value = $array[$key];
            unset($array[$key]);
        } else {
            $value = $default;
        }

        return $value;
    }
public static function pull(&$array, $key, $default = null)
    {
        if (array_key_exists($key, $array)) {
            $value = $array[$key];
            unset($array[$key]);
        } else {
            $value = $default;
        }

        return $value;
    }
public static function pull ( & $ array , $ key , $ default = null ) { if ( array_key_exists ( $ key , $ array ) ) { $ value = $ array [ $ key ] ; unset ( $ array [ $ key ] ) ; } else { $ value = $ default ; } return $ value ; }
Get a value from the array, and remove it.

@param  array   $array
@param  string  $key
@param  mixed   $default
@return mixed
Get a value from the array and remove it .