ar iance ▁in ▁method ▁parameters ▁is ▁PHP ▁in ▁regards ▁to ▁class ▁construct ors . ▁In ▁the ▁following ▁example , ▁the ▁__ construct () ▁method ▁is ▁accepted , ▁despite ▁the ▁method ▁parameter ▁being ▁cov ari ant ▁to ▁the ▁parent ' s ▁method ▁parameter . ▁W ere ▁this ▁method ▁anything ▁other ▁than ▁__ construct (), ▁an ▁error ▁would ▁occur : ▁ ▁interface ▁Animal Interface ▁{} ▁ ▁interface ▁Dog Interface ▁extends ▁Animal Interface ▁{} ▁ ▁class ▁Dog ▁implements ▁Dog Interface ▁{} ▁ ▁class ▁Pet ▁{ ▁▁▁▁ ▁public ▁function ▁__ construct ( An imal Interface ▁$ an imal ) ▁{} ▁} ▁ ▁class ▁Pet D og ▁extends ▁Pet ▁{ ▁▁▁▁ ▁public ▁function ▁__ construct ( D og Interface ▁$ dog ) ▁▁▁▁ ▁{ ▁▁▁▁▁▁▁▁ ▁parent :: __ construct ($ dog ); ▁▁▁▁ ▁} ▁} ▁ ▁Another ▁example ▁where ▁cov ari ant ▁parameters ▁seem ▁helpful ▁is ▁so - called ▁binary ▁methods , ▁i . e . ▁methods ▁where ▁the ▁parameter ▁is ▁expected ▁to ▁be ▁of ▁the ▁same ▁type ▁as ▁the ▁object ▁the ▁method ▁is ▁called ▁on . ▁An ▁example ▁is ▁the ▁ ▁method : ▁ ▁checks ▁whether ▁ ▁comes ▁before ▁or ▁after ▁ ▁in ▁some ▁ordering , ▁but ▁the ▁way ▁to ▁compare , ▁say , ▁two ▁rational ▁numbers ▁will ▁be ▁different ▁from ▁the ▁way ▁to ▁compare ▁two ▁strings . ▁Other ▁common ▁examples ▁of ▁binary ▁methods ▁include ▁equality ▁tests , ▁arithmetic ▁operations , ▁and ▁set ▁operations ▁like ▁subset ▁and ▁union . ▁ ▁In ▁older ▁versions ▁of ▁Java , ▁the ▁comparison ▁method ▁was ▁specified ▁as ▁an ▁interface ▁: ▁ ▁interface