Is it possible to clone a object to a static object?

as the title says.

Can I clone a normal object ( class ) to a static object ( static class) ?
if so can somebody show an example how I can achieve this ?

best regards,
Wouter.

that would defeat the purpose of cloning, because you would create a different object rather than an equal one. (though you could certainly unserialize an object to a different class.)

on-the-other-hand-side, what is a static class? I know of static properties and static methods, but not static classes.

It also defeats the purpose of OOP. In OOP objects are useful because you can have multiple instances with different states. Static only allows you to have one global state.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.