public void clear() {
        // override to reset the linked list
        super.clear();
        header.before = header.after = header;
    }
Clears the map, resetting the size to zero and nullifying references
to avoid garbage collection issues.
jphp-runtime/src/php/runtime/common/collections/map/AbstractLinkedMap.java