php - OOP_PHP - Difference between an Instance of a classA and an empty classB that inherits from classA -
in case classa public . need know difference . in others words . benefits got when (extending empty classb public class a) instead of (using instance of classa) . , vice versa ..
there several cases.
- while refactoring need rename class keep legacy code working.
- it's exception type used discriminator.
- it's alias. example, mysql has synonyms
tinyint(1)
,boolean
. - ...
i think there more cases.
Comments
Post a Comment