public <T extends IObject> T cloneObject(T value, Environment env, TraceInfo trace) throws Throwable {
        IObject copy = this.newObjectWithoutConstruct(env);
        ForeachIterator iterator = value.getProperties().foreachIterator(false, false);
        ArrayMemory props = copy.getPropertiesForChange();
        while (iterator.next()) {
            Object key = iterator.getKey();
            if (key instanceof String) {
                String name = (String) key;
                if (name.indexOf('\0') > -1)
                    name = name.substring(name.lastIndexOf('\0') + 1);

                PropertyEntity entity = properties.get(name);
                if (entity != null) {
                    props.put(entity.getSpecificName(), iterator.getValue().fast_toImmutable());
                } else
                    props.put(key, iterator.getValue().fast_toImmutable());
            } else
                props.put(key, iterator.getValue().fast_toImmutable());
        }

        if (methodMagicClone != null) {
            ObjectInvokeHelper.invokeMethod(copy, methodMagicClone, env, trace, null, true);
        }

        return (T) copy;
    }
return empty list if success else list with not valid implemented methods in class

@param _interface
@return
jphp-runtime/src/php/runtime/reflection/ClassEntity.java