Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102498 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15009 invoked from network); 27 Jun 2018 16:35:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jun 2018 16:35:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=spam-free@blueyonder.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=spam-free@blueyonder.co.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain blueyonder.co.uk designates 80.0.253.67 as permitted sender) X-PHP-List-Original-Sender: spam-free@blueyonder.co.uk X-Host-Fingerprint: 80.0.253.67 know-smtprelay-omc-3.server.virginmedia.net Received: from [80.0.253.67] ([80.0.253.67:41750] helo=know-smtprelay-omc-3.server.virginmedia.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/01-01794-BBCB33B5 for ; Wed, 27 Jun 2018 12:35:10 -0400 Received: from [192.168.0.100] ([82.47.50.152]) by cmsmtp with ESMTPA id YDPMfpAk3btAcYDPMfAAUO; Wed, 27 Jun 2018 17:35:04 +0100 X-Originating-IP: [82.47.50.152] X-Authenticated-User: spam-free@blueyonder.co.uk X-Spam: 0 X-Authority: v=2.3 cv=QvlwI26d c=1 sm=1 tr=0 a=TAE3a1YMiMiF8Y4yWzocug==:117 a=TAE3a1YMiMiF8Y4yWzocug==:17 a=IkcTkHD0fZMA:10 a=x7bEGLp0ZPQA:10 a=a5Gf7U6LAAAA:8 a=67BIL_jfAAAA:8 a=9jYc_04Wtpx8So60mSMA:9 a=WGToJKLaOWNju49g:21 a=K5JUryRTWgQ7ytxn:21 a=QEXdDO2ut3YA:10 a=VWYBCMy2-3DvUfgBPAUA:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blueyonder.co.uk; s=meg.feb2017; t=1530117304; bh=Ie8vi32vE1HQpkyhZlyDLwavmuKI9DItiR1gJnKbVw8=; h=Subject:To:References:From:Date:In-Reply-To; b=jnyc9DDBILvJCgoQDW3FrBVcH1A13dowJRfruxVLSWRkU8ALYkNGQmVaUQDAUltqN NHxUvpxM16WzWzdClPo+ffrS5Tv2wNbW3lRJ/TX9JaJo4erC39neJzOxVq1dqx2YrX wLCFch8snKRAjgcksrbAuqMzhUXFIrp7OI833fuO6qffixtFWA2HWT463Z8COaMW4I 76e2gz71sQukfGyLl4GTyVKtLTpFhqd7tpMvMRXw4eEG+/s5cH9oAjQJa/fJdbOw6z eEegNQqrUQF4vHlokO9NVjN7eEfN6LZSnk+bBlxx8qL8EcgNus5HBXvTAJM+OocT30 Xxe/7HO+gxQ1w== To: internals@lists.php.net References: <7dcfbc12-8ab5-0125-cfee-171c9a422b7e@blueyonder.co.uk> Message-ID: <9ec42a64-7745-6a9e-88f9-7178cea642d2@blueyonder.co.uk> Date: Wed, 27 Jun 2018 17:35:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfM4GpYbiLiZ4ofvRtee+PIuuIV80kbAWimQTG0mnvudwYgtwanAIwMHdk2IdRY1pQ5qRHbmiafxKUsr+/uDTJSoXV9xbPX9UsWv+U+st8ep0akEU70yP ptJJtC3F76uDsf7wrFpGpL0efrBB2Bpf5z+jd4gM/eC5nLqHTVg6MDTPMLcOrLDRftMH3tBKpIaOo82XYSPmZNYgaJUSOxlFWn66fH6fSHaG4XJ5kmXv2DUA Subject: Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch From: spam-free@blueyonder.co.uk (niel) On 27/06/18 16:59, Rowan Collins wrote: > On 27 June 2018 at 16:45, niel wrote: > >> On 24/06/18 17:16, Nikita Popov wrote: >> >>> Hi internals, >>> >>> Another small deprecation for your consideration... >>> >>> https://wiki.php.net/rfc/continue_on_switch_deprecation >>> >>> Regards, >>> Nikita >>> >>> >> Could you clarify the PHP 8 changes: >> >> "PHP 8 generates a compile error." >> >> Does this mean *any* use of continue in a switch is a compile error, or >> only continue without a number >> > > > Neither: > >> Continue can still be used inside switch statements, as long as it does > not target the switch > The lines marked "Deprecated" in the examples are the ones which will be > compile errors. This appears to contradict your 'neither'. `continue` as part of a `case` will always be a compile error in 8? Apologies if my mention of switch previously was ambiguous. Will the PHP 8 version still require the programmer to count over the switches, i.e. in the third illustration, would the continue 3 still be needed for C-like behaviour? If that is true, then I really have no use for this proposal as it doesn't fix the problem, just moves it.