src/SelvinOrtiz/Dot/Dot.php
public static function delete(array &$arr, $key)
    {
        if (strpos($key, '.') !== false && ($keys = explode('.', $key)) && count($keys)) {
            while (count($keys) > 1) {
                $arr = &$arr[array_shift($keys)];
            }

            unset($arr[array_shift($keys)]);
        } else {
            unset($arr[$key]);
        }
    }
public static function delete(array &$arr, $key)
    {
        if (strpos($key, '.') !== false && ($keys = explode('.', $key)) && count($keys)) {
            while (count($keys) > 1) {
                $arr = &$arr[array_shift($keys)];
            }

            unset($arr[array_shift($keys)]);
        } else {
            unset($arr[$key]);
        }
    }
Deletes a $key and its value from the $arr

@param  array &$arr
@param string $key