src/Util/Arrays.php
public static function pick(array &$arr, $key)
    {
        if (\array_key_exists($key, $arr)) {
            $value = $arr[$key];
            unset($arr[$key]);

            return $value;
        }

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

            return $value;
        }

        return null;
    }
public static function pick ( array & $ arr , $ key ) { if ( \ array_key_exists ( $ key , $ arr ) ) { $ value = $ arr [ $ key ] ; unset ( $ arr [ $ key ] ) ; return $ value ; } return null ; }
Picks element from the array by key and return its value.

@param array       $arr
@param  string|int $key array key

@return mixed
Picks element from the array by key and return its value .