Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83590 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1036 invoked from network); 23 Feb 2015 17:08:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2015 17:08:35 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.213.179 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.213.179 mail-ig0-f179.google.com Received: from [209.85.213.179] ([209.85.213.179:50265] helo=mail-ig0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/A7-01128-29E5BE45 for ; Mon, 23 Feb 2015 12:08:35 -0500 Received: by mail-ig0-f179.google.com with SMTP id l13so19925250iga.0 for ; Mon, 23 Feb 2015 09:08:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Jmfi6z8iYXL6634gXvDEKypHlc3Rt0xnL/hMtwUnojM=; b=B1qDxsR162BrmpKjDLLcW0qzaPjEN038jgZV2W0kZCprgvaF9X5l6IFviykSY2Os6f nTUlQWbhKgSlDSnJKEOysgp4u4XYMPEApRVS4Q7mrcDKFWMVc4EsipmU83RZfLVF8L8F d4HLOTVOvXHM0pMnaSuEqKAv2Scf4gm0XI9zu+DRh3VUdQDfS6iMjPFhQKFrY8p6V1id GZJGIampkKI819400V9jQPrCb0LmWQeuZGl6A/lZ5Eyhg/b7xYzjKfPlRHQ1UPMOJkNz usowUeVUW+lM0MAZ8sxX7RD/rFKLEo+3IjLUrjc2UQxy/HDiEVDDi99pJWYKSTBNXmeA U2xw== X-Gm-Message-State: ALoCoQnw58L4+lTXsvM/NcxKmOWYQA77666T4JMQIQLCsyDk/3ORDDXjFbAl4AI0cP6PWfYGJim/iEKVDdoVheBN8qYjQtmjuBbdDNutbobNpdPI84jmuDVKSyuM+/eEVqvG26OhIzItEwQpU6K13bZzbAyoz8Bl0w== X-Received: by 10.50.7.1 with SMTP id f1mr14162847iga.8.1424711312283; Mon, 23 Feb 2015 09:08:32 -0800 (PST) References: <7ef509ef10bb345c792f9d259c7a3fbb@mail.gmail.com> <9aec85c81b49009c6238ff6d8be27cd4@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKcPg+jpyYspJS11b5G1A7RBHpKTgIs5D7XAe7Kvi4CGebHCJs06+dA Date: Mon, 23 Feb 2015 19:08:31 +0200 Message-ID: To: Benjamin Eberlei Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [PHP-DEV] Coercive Scalar Type Hints RFC From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Benjamin Eberlei [mailto:kontakt@beberlei.de] > Sent: Monday, February 23, 2015 6:54 PM > To: Zeev Suraski > Cc: PHP internals > Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC > > Zeev, > > On Sat, Feb 21, 2015 at 11:25 PM, Zeev Suraski wrote: > > > Additional options we could entertain are: > > 5. Go for just E_DEPRECATED in 7.0. Change E_DEPRECATED to > E_RECOVERABLE_ERROR in 7.1/7.2/8.0 (TBD). > > 6. Same as #5, but also provide a mechanism similar to declare() as > the temporary measure for strict campers to explicitly ask for > E_RECOVERABLE_ERROR=E2=80=99s to be triggered. They will no longer be ne= cessary > when we change E_DEPRECATED to E_RECOVERABLE_ERROR in 7.1/7.2/8.0. > > > 5. BC Break too big leading to a Python2/3 situation, low adoption of > PHP7, > something that especially you couldn't want given that the perf > improvements are what keeps PHP on level with HHVM. This automatically > applies to all internal functions regardless if userland uses typehints o= r > not, > wordpress will not work with this anymore, no performance comparisons > anymore. I don't see how that would affect PHP 7 adoption at all actually. You can just disable E_DEPRECATED and your upgrade would be clean. Technically it would have to wait to PHP 8 before we change it to E_RECOVERABLE_ERROR, giv= e users several years to migrate. Given we're talking about coercive rules and not strict rules, I actually don't expect that many failures (initial tests of Francois' patch results in 8% failures in our unit tests, and that's before tweaking the rules in any way (and apparently, at least some of them have to do with bugs in internal functions that can be easily fixed). It doesn't strike me as a worse migration than we did getting rid of magic_quotes or safe_mode. It can be done. I'm personally now leaning towards this option as the most viable one. > 6. Ok, so this is now getting very similar like v5 of the STH, but still > with much > more BC breaks. Not at all. With the Dual Mode RFC, we're going to have declare() and two distinct modes even in 10 and 20 years from now, for all eternity. It's a new feature that's here to say. With this, these declare()'s are a migration feature, that will be gone in several years. The endgame is completely different. Zeev