On Thu, May 25, 2017 at 4:30 PM, Andrey Andreev <n...@devilix.net> wrote:

> I'm trying, but fail to find a source that says replacing stdClass
> with mixed/any/etc is ok.


It is OK for a subtype to handle a wider range of types than its contract,
it is not ok for the subtype to handle a smaller range of types than its
contract.

A contract says what you "must" be able to do to satisfy it, so the
invariants hold.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

Reply via email to