public ModuleEntity importModule(Context context) throws Throwable {
        String moduleName = context.getModuleName();
        ModuleEntity module = moduleName == null ? null : scope.findUserModule(moduleName);
        if (module == null) {
            AbstractCompiler compiler = scope.createCompiler(this, context);
            module = compiler.compile(true);
            synchronized (scope) {
                scope.loadModule(module);
            }
        }

        registerModule(module);
        return module;
    }
Remove all method which does not destruct

@throws Throwable
jphp-runtime/src/php/runtime/env/Environment.java