protected static function removeSegments(array &$array, $key)
    {
        $parts = self::explodeDotNotationKeys($key);

        while (count($parts) > 1) {
            $part = array_shift($parts);
            if (isset($array[$part]) && is_array($array[$part])) {
                $array =& $array[$part];
            }
        }
        unset($array[array_shift($parts)]);
    }
protected static function removeSegments(array &$array, $key)
    {
        $parts = self::explodeDotNotationKeys($key);

        while (count($parts) > 1) {
            $part = array_shift($parts);
            if (isset($array[$part]) && is_array($array[$part])) {
                $array =& $array[$part];
            }
        }
        unset($array[array_shift($parts)]);
    }
protected static function removeSegments ( array & $ array , $ key ) { $ parts = self :: explodeDotNotationKeys ( $ key ) ; while ( count ( $ parts ) > 1 ) { $ part = array_shift ( $ parts ) ; if ( isset ( $ array [ $ part ] ) && is_array ( $ array [ $ part ] ) ) { $ array = & $ array [ $ part ] ; } } unset ( $ array [ array_shift ( $ parts ) ] ) ; }
Forget segments within the array

@since 3.0.0

@param array $array
@param string $key
Forget segments within the array