Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87319 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90395 invoked from network); 27 Jul 2015 14:28:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2015 14:28:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:33288] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/21-17059-8FF36B55 for ; Mon, 27 Jul 2015 10:28:08 -0400 Received: by wicmv11 with SMTP id mv11so141785743wic.0 for ; Mon, 27 Jul 2015 07:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:to:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=zWYv7nn8szqDhCa62/akF37H5BHct8nR+C/0Njx8u0k=; b=f9WKUKdtgu+d7+K7VHkujdVwqowCbtPFieIUB4Eg3887DR7pBwUyh8XotUx8Y0lCgk LxovkJmFgHkvIEoQ10knkTBAXs9KEW+2RaLzPoiZ3oEriGfFvBolwxiQaLe5Rhl58Vhq Iabz0q/OuVXGdfyllA56jT0vBbA53mgZH4KoWu9S3pb2odHB+QctUP4KCnaZMqgPjloY zQgmPwNYp6uaCeW80yZBnwiKYbSW/q7ypDuiltqMLRwZEnSauaa1YvTt/Rh2TXIWkeUJ 0P+HTUKj79UEUFd+je9k2xswg0TREoATDjdLgf/wIwsC1BZ79Gj/n6e446BCAIofTwhF e7cQ== X-Received: by 10.180.211.98 with SMTP id nb2mr24582970wic.91.1438007285433; Mon, 27 Jul 2015 07:28:05 -0700 (PDT) Received: from [192.168.0.136] ([62.189.198.114]) by smtp.googlemail.com with ESMTPSA id m4sm28165356wjb.37.2015.07.27.07.28.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 07:28:04 -0700 (PDT) References: <836BA21C-AE99-4E7B-AB06-EBC30E41BA0E@icicle.io> <0AD335F5-35F3-4D98-8F82-800A1EDF8FD8@icicle.io> <05f101d0c838$fcdab5e0$f69021a0$@belski.net> To: PHP Internals Message-ID: <55B63FDF.6050100@gmail.com> Date: Mon, 27 Jul 2015 15:27:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Core functions throwing exceptions in PHP7 From: rowan.collins@gmail.com (Rowan Collins) Scott Arciszewski wrote on 27/07/2015 07:57: > My only concern is that, we have a fixed timetable for the 7.0.0 > release. It's certainly a good idea to develop a cogent strategy > before moving forward, but I worry that bikeshedding will get involved > and we won't make the deadline. > > I propose that, if a better strategy cannot be presented in time for > RC1, consistency should take a back seat to security. Fail hard, throw > an Error, deal with the details later. I think taking on board Anatol's concerns about proper planning and consistency, and yours about short timescales, the reasonable solution is to create as small a possibility for future BC as possible, while maintaining the "fail hard" policy. My suggestion would therefore be to raise an E_ERROR for this case in 7.0. Unlike an E_RECOVERABLE_ERROR or any kind of Throwable, there is no way that code can be written to explicitly handle that case, it will simply halt execution. As such, there are no limits to what we can introduce later, other than that unmodified code should continue to fail hard. This buys us time to put together a cogent policy for what if any built-in functions can make use of Throwables in the 7.x release series, with a likely result of throwing some class of Error for this function in 7.1. Regards, -- Rowan Collins [IMSoP]