Get Mystery Box with random crypto!

Double Dispatch The computation of a method call is only depen | Amazing PHP

Double Dispatch
The computation of a method call is only dependent on the object receiving the method call. Most of the time that's enough. However, sometimes we need the computation to also depend on the argument being passed to the method call.
Think you have two hierarchies of objects interacting with each other and the computation of these interactions depends on both objects, not only in one of them. Maybe some examples will make this clearer.