public static function arrayPathUnset(&$array, $path, $glue='.')
    {
        if (!is_array($path)) {
            $path = explode($glue, $path);
        }

        $key = array_shift($path);

        if (empty($path)) {
            unset($array[$key]);
        } else {
            self::arrayPathUnset($array[$key], $path);
        }
    }