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

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

        return $value;
    }
public static function arrayPick ( array & $ array , $ key , $ value = null ) { if ( array_key_exists ( $ key , $ array ) ) { $ value = $ array [ $ key ] ?? $ value ; unset ( $ array [ $ key ] ) ; } return $ value ; }
Array pick.
@param  array      &$array
@param  int|string $key
@param  any        $value
@return any
Array pick .