deletes an item from an array with dottet dimensions

@param string		$key
@param array		$arr
@return void
329481
public static function delete( $key, &$arr ) 
	{	
		if ( isset( $arr[$key] ) ) 
		{
			unset( $arr[$key] ); return;
		}

		if ( strpos( $key, '.' ) !== false ) 
		{	
			$kp = explode( '.', $key );

			switch ( count( $kp ) ) {
				case 2:
					unset( $arr[$kp[0]][$kp[1]] ); return; break;
				case 3:
					unset( $arr[$kp[0]][$kp[1]][$kp[2]] ); return; break;
				case 4:
					unset( $arr[$kp[0]][$kp[1]][$kp[2]][$kp[3]] ); return; break;
			}
		}
	}
373567
public function delete($key) {
    $directory = $this->environment->getHooksDirectory();
    $data_file = "$directory/{$key}_processed.php";

    if (file_exists($data_file)) {
      unlink($data_file);
    }
  }
62523
protected static function deleteMultiple(array &$arr, array $keys)
    {
        $return = [];
        foreach ($keys as $key) {
            $return[$key] = static::delete($arr, $key);
        }

        return $return;
    }
1118455
public static function pick(array &$arr, $key)
    {
        if (\array_key_exists($key, $arr)) {
            $value = $arr[$key];
            unset($arr[$key]);

            return $value;
        }

        return null;
    }
614700
public static function doteToArr($key = '', &$arr = [], $default = null)
    {
        if (!strpos($key, '.')) {
            return isset($arr[$key]) ? $arr[$key] : $default;
        }

        // 获取多维数组
        $key = explode('.', $key);
        $tmp = null;
        foreach ($key as $k) {
            if (is_null($tmp)) {
                if (isset($arr[$k])) {
                    $tmp = $arr[$k];
                } else {
                    return $default;
                }
            } else {
                if (isset($tmp[$k])) {
                    $tmp = $tmp[$k];
                } else {
                    return $default;
                }
            }
        }
        return $tmp;
    }
152907
public function remove($key): void
    {
        foreach ((array) $key as $key) {
            unset($_SESSION[$this->name][$key]);
        }
    }
77337
public function delete($key)
    {
        $this->checkPermissions($key, self::ACTION_DELETE);
        unset($this->scope[$key]);
    }
451177
private function cleanArrayKey($key, &$array, $replaceWith)
    {
        $keys = explode('.', $key);

        foreach ($keys as $k) {

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

        return $array = $this->cleanString($array, $replaceWith);
    }
1323712
public static function remove(&$arr, $key, $default = null)
    {
        if (isset($arr[$key])) {
            $value = $arr[$key];
            unset($arr[$key]);
        } else {
            $value = $default;
        }

        return $value;
    }
404551
public static function insertAfter(array &$arr, $key, array $inserted): void
    {
        $offset = self::searchKey($arr, $key);
        if ($offset === null) {
            $arr += $inserted;
        } else {
            ++$offset;
            $arr = \array_slice($arr, 0, $offset, true) + $inserted + \array_slice($arr, $offset, null, true);
        }
    }
1194089
public static function insertBefore(array &$arr, $key, array $inserted): void
    {
        $offset = (int) self::searchKey($arr, $key);
        $arr = \array_slice($arr, 0, $offset, true) + $inserted + \array_slice($arr, $offset, null, true);
    }
932647
public function deleteItem($key)
    {
        if (!is_string($key))
            throw new InvalidArgumentException("Invalid key: " . WF::str($key)); 

        unset($this->cache[$key]);
        return true;
    }
44295
function erase(arr, item) {
	var i = arr.length;
	while (i--) {
		if (arr[i] === item) {
			arr.splice(i, 1);
			break;
		}
	}
	//return arr;
}
58042
public static function without(array $arr, string ...$keys): array
    {
        foreach ($keys as $key) {
            if (isset($arr[$key])) {
                unset($arr[$key]);
            }
        }
        return $arr;
    }
896905
public function delete($key)
    {
        $file = $this->getFilename($key);
        if (file_exists($file)) {
            unlink($file);
        }
    }
632492
public void delete(int key) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);

        if (i >= 0) {
            System.arraycopy(mKeys, i + 1, mKeys, i, mSize - (i + 1));
            System.arraycopy(mValues, i + 1, mValues, i, mSize - (i + 1));
            mSize--;
        }
    }
129942
public function delete($key)
    {
        $this->setScope($key);
        parent::delete($key);
        /** @noinspection PhpInternalEntityUsedInspection */
        $this->key = null;
    }