final public Memory fast_toImmutable() {
        switch (type) {
            case INT:
            case BOOL:
            case NULL:
            case DOUBLE:
            case STRING:
            case OBJECT:
                return this;
            default:
                return toImmutable();
        }
    }
This method more faster than toImmutable because is not overrided and is final
jphp-runtime/src/php/runtime/Memory.java