public Memory remove(Object key) {
        int hashCode = hash((key == null) ? NULL : key);
        int index = hashIndex(hashCode, data.length);
        ArrayMapEntryMemory entry = data[index];
        ArrayMapEntryMemory previous = null;
        while (entry != null) {
            if (entry.hashCode == hashCode && isEqualKey(key, entry.getKey())) {
                Memory oldValue = entry.getValue();
                removeMapping(entry, index, previous);
                return oldValue;
            }
            previous = entry;
            entry = entry.next;
        }
        return null;
    }
Removes the specified mapping from this map.

@param key the mapping to remove
@return the value mapped to the removed key, null if key not in map
jphp-runtime/src/php/runtime/memory/support/ArrayMemoryMap.java