# Object Aggregation/Composition [PHP 4]

&reftitle.intro; &warn.experimental;

In Object Oriented Programming, it is common to see the composition of simple classes (and/or instances) into a more complex one. This is a flexible strategy for building complicated objects and object hierarchies and can function as a dynamic alternative to multiple inheritance. There are two ways to perform class (and/or object) composition depending on the relationship between the composed elements: Association and Aggregation.

&reference.objaggregation.examples; &reference.objaggregation.reference;