Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73027 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8420 invoked from network); 9 Mar 2014 08:50:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2014 08:50:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.51 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.51 mail-qa0-f51.google.com Received: from [209.85.216.51] ([209.85.216.51:38385] helo=mail-qa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/43-18839-E6B2C135 for ; Sun, 09 Mar 2014 03:50:54 -0500 Received: by mail-qa0-f51.google.com with SMTP id cm18so4046616qab.10 for ; Sun, 09 Mar 2014 00:50:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Kd4i3tH2N8gwAwWQoJonoQyjr6kt1MgqFKE3nziTt2o=; b=MSeNIANIOiDVuTOSM0qqhMQ6rzxX1a94LjtqYD9UqFabwEPutIojhe1XLWs2YTXou5 HcOUV7ld9oOK1YyodRDNpr5z47L7BG5tewGZj0sRXeSkHF/LcLNLRq0x1tDMXbxLgWfJ xR1Q6Z0eACMIDtR/DzfgOtqbxZlR2jjIm0wGvw8qqj8v/Sy7L60+7ozBLHQXPhtvW4xS rMwp1Cz4AHd783/KA64F4+TQLnB5dsdI6K4m88Vx8obT/wkyd3F1Ba3RCFfvoNHU4ON1 wmfFulkx1tgzkAf3hDRvhSfTOrnpp4xEMUk640cwdB8/z3djYT3zkzAU6w4s39D2UalN tXdw== MIME-Version: 1.0 X-Received: by 10.140.83.203 with SMTP id j69mr31777795qgd.42.1394355052215; Sun, 09 Mar 2014 00:50:52 -0800 (PST) Received: by 10.140.18.145 with HTTP; Sun, 9 Mar 2014 00:50:52 -0800 (PST) In-Reply-To: References: Date: Sun, 9 Mar 2014 09:50:52 +0100 Message-ID: To: Marco Schuster Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Idea: ifdef-like feature to ease userland BC From: pierre.php@gmail.com (Pierre Joye) hi Marco, On Sat, Mar 8, 2014 at 10:34 PM, Marco Schuster wrote: > Hi Internals, > > especially with (radical) userland API changes coming up in PHP6, > might I suggest something like a ifdef feature which turns blocks of > code into comments? > This would allow framework authors to provide backwards compatibility > with "older" PHP versions while being able to take advantage of new > PHP features. > In theory, it could also be supplied as "update" to the already > existing minor versions (5.4,5.5 and 5.6) so that these versions can > also use the new code. We had a similar discussion about adding conditional blocks using the php version some time ago. One of the main point against adding such feature was that packagers tools are a better place to deal with that. I agree it won't solve the multiple files requirement if one project like to use newer syntax while keeping compatibility with older php versions, but I do not see that as a bad thing. Cheers, -- Pierre @pierrejoye | http://www.libgd.org