Posts tagged ‘object’

Initializing objects from other objects in PHP

Sometimes we need to initialize an object based on another object. Typically, if we have a class MyClass and subclass MyExtendedClass with some additional functionality, we may need to turn a MyClass object into a MyExtendedClass object. How to do that easily in PHP?

Continue reading ‘Initializing objects from other objects in PHP’ »