src/Colorium/Tools/ArrayDot.php
public static function drop(array &$array, $key)
    {
        $keys = explode('.', $key);
        $last = array_pop($keys);
        foreach($keys as $key) {
            if(!isset($array[$key])) {
                return false;
            }
            $array = &$array[$key];
        }

        if(isset($array[$last])) {
            unset($array[$last]);
            return true;
        }

        return false;
    }
public static function drop(array &$array, $key)
    {
        $keys = explode('.', $key);
        $last = array_pop($keys);
        foreach($keys as $key) {
            if(!isset($array[$key])) {
                return false;
            }
            $array = &$array[$key];
        }

        if(isset($array[$last])) {
            unset($array[$last]);
            return true;
        }

        return false;
    }
public static function drop ( array & $ array , $ key ) { $ keys = explode ( '.' , $ key ) ; $ last = array_pop ( $ keys ) ; foreach ( $ keys as $ key ) { if ( ! isset ( $ array [ $ key ] ) ) { return false ; } $ array = & $ array [ $ key ] ; } if ( isset ( $ array [ $ last ] ) ) { unset ( $ array [ $ last ] ) ; return true ; } return false ; }
Delete key in array

@param array $array
@param string $key
@return bool
Delete key in array