aggregation on the other hand implies encapsulation hidding of the parts of the composition we can aggregate classes by using a static inner class php does not yet support inner classes in this case the aggregated class definition is not accessible except through the class that contains it the aggregation of instances object aggregation involves the dynamic creation of subobjects inside an object in the process expanding the properties and methods of that object 