public int indexOf(Object key) {
        int i = 0;
        for (ArrayMapEntryMemory entry = header.after; entry != header; entry = entry.after, i++) {
            if (isEqualKey(key, entry.getKey())) {
                return i;
            }
        }
        return -1;
    }
Gets the index of the specified key.

@param key the key to find the index of
@return the index, or -1 if not found
jphp-runtime/src/php/runtime/memory/support/ArrayMemoryMap.java