Arr.php
public static function remove(array& $array, string $key, string $delimiter = null)
    {
        // Which string delimiter should we use?
        if (!isset($delimiter)) {
            $delimiter = static::$delimiter;
        }

        // Explode the key according to that delimiter.
        $keys = explode($delimiter, $key);

        while ($key = array_shift($keys)) {
            if (!isset($array[$key]) || !is_array($array[$key])) {
                return;
            }

            $array =& $array[$key];
        }

        unset($array[array_shift($keys)]);
    }
public static function remove(array& $array, string $key, string $delimiter = null)
    {
        // Which string delimiter should we use?
        if (!isset($delimiter)) {
            $delimiter = static::$delimiter;
        }

        // Explode the key according to that delimiter.
        $keys = explode($delimiter, $key);

        while ($key = array_shift($keys)) {
            if (!isset($array[$key]) || !is_array($array[$key])) {
                return;
            }

            $array =& $array[$key];
        }

        unset($array[array_shift($keys)]);
    }
public static function remove ( array & $ array , string $ key , string $ delimiter = null ) { // Which string delimiter should we use? if ( ! isset ( $ delimiter ) ) { $ delimiter = static :: $ delimiter ; } // Explode the key according to that delimiter. $ keys = explode ( $ delimiter , $ key ) ; while ( $ key = array_shift ( $ keys ) ) { if ( ! isset ( $ array [ $ key ] ) || ! is_array ( $ array [ $ key ] ) ) { return ; } $ array = & $ array [ $ key ] ; } unset ( $ array [ array_shift ( $ keys ) ] ) ; }
Removes a string delimited key from the given array.

@param   array&  $array      The array to search in.
@param   string  $key        The string delimited key.
@param   string  $delimiter  The delimiter to use when exploding the key into parts.
Removes a string delimited key from the given array .