RE: [PHP-DEV] Implementing interface method with child class in parameter def (Bug #42330)

From: Date: Wed, 17 Sep 2014 15:50:04 +0000
Subject: RE: [PHP-DEV] Implementing interface method with child class in parameter def (Bug #42330)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-77295@lists.php.net to get a copy of this message
From: Johannes Schlüter [mailto:johannes@schlueters.de] > Thus having > > function bar(C $c) { > $a = new A(); > $c->foo($a); > } > > might work or might not work as $c might be an instance of D. Thus > breaks the Liskov Substitution Principle > http://en.wikipedia.org/wiki/Liskov_substitution_principle > Oh, now I see. Thanks fort he example, that helped ;) Christian

« previous php.internals (#77295) next »