Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99179 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23844 invoked from network); 25 May 2017 15:59:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2017 15:59:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.48 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.48 mail-wm0-f48.google.com Received: from [74.125.82.48] ([74.125.82.48:36331] helo=mail-wm0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/D9-10292-B5FF6295 for ; Thu, 25 May 2017 11:59:24 -0400 Received: by mail-wm0-f48.google.com with SMTP id 7so97042285wmo.1 for ; Thu, 25 May 2017 08:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xSube615jJ9gdPskL3DCCGicowZaYyHTEuysjUBroEM=; b=qCBEgMF3TG4HPTFGRFkx+TvvK4oAWdjRWwWGK9J/dbXcbGj1sz7LhgDvFM7MZtujq8 cETvAclzbyWavxghdKzm7UJF5oBBNFojErTFY05DvXc2k++GOa2hHMSoSPLsSsLiFNIi qSH77lwQXedHHd1Lyu4nA2QDC0TzPu6yc+3RUeBhzfz9yPiKN+Z6eQkbllk+flxS7Qg1 2f1/fusjaPAcsmrtOA+p03GEwQsxisPo8Do6gxH6HGNEtTKFxPgIn5k7topp0EHHqlKp saClMy/GdoHN/xetEDpgoQl4ohK/cPlqtKmjs8jX8rksAOyIpCR54zIxH8eHEhyBv9yz U+mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xSube615jJ9gdPskL3DCCGicowZaYyHTEuysjUBroEM=; b=PO/fju7V4B/kPPB1KeUkNr1Rqx0W+3YBlBggWZfmmGcQkLJmWBG7RVj5T53dJJzjQC vuL7sIN1cbX4AKr71MhJa5YFzwdxrHWN7cglP3o/noL9JoEic1BGxZdmIHtG9UV8EgAc zk0EW4IYJV9FqL2s7KLAdX8ONYQO+YrJfxz4tBzMLha4KrSTd6AlFrjaI9m3E9j7DsjI Rc5zaKvRF6osVOmrRkDhXAJKQsXUlWm78/S1JZUVFvRKF+j6fCuhLsg4JCL3sMmwG7mf rx0CFsemujl8JeQtjtAGMHltllNwRiYgumtZmQPEAARoSr5kynzZBXoA5JlwtfOa6VMv 7hUQ== X-Gm-Message-State: AODbwcCew/lE3aa5xYJ8aX4Pj3ISLgE0tUBhLze3dvl90ffU27JcY/nl ucqU9PlSuu5F+4B5Cyt1ZE2XG/DROnTLmdE= X-Received: by 10.223.142.50 with SMTP id n47mr23772897wrb.188.1495727960627; Thu, 25 May 2017 08:59:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.161.147 with HTTP; Thu, 25 May 2017 08:58:59 -0700 (PDT) In-Reply-To: References: <269187f4-5924-a7cc-9163-40134546451f@fleshgrinder.com> Date: Thu, 25 May 2017 17:58:59 +0200 Message-ID: To: Andrey Andreev Cc: "internals@lists.php.net" , Rasmus Schultz Content-Type: multipart/alternative; boundary="f403045f50d6c622f005505b4dea" Subject: Re: [PHP-DEV] Parameter type widening RFC From: ocramius@gmail.com (Marco Pivetta) --f403045f50d6c622f005505b4dea Content-Type: text/plain; charset="UTF-8" On Thu, May 25, 2017 at 4:30 PM, Andrey Andreev 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/ --f403045f50d6c622f005505b4dea--