Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71763 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8318 invoked from network); 29 Jan 2014 23:39:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2014 23:39:45 -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 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:48882] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/D9-52228-F3199E25 for ; Wed, 29 Jan 2014 18:39:44 -0500 Received: by mail-wg0-f46.google.com with SMTP id x12so4864431wgg.25 for ; Wed, 29 Jan 2014 15:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=mkI9qMItk7DRQTuiacRr6VSpgZ1Yu/P1oZ4p9AE3d4o=; b=tel0SYG4uAYRNf/e2Z4qU6uJs1Xl8KJylSDMQA9EX5+biSMhxdsftXj8FwQCgszaju 3FlrlEaxaUBKRhHsVWlc57FmC8cXHwAgFAGJ/7v5vz/J5IElwAlQzb1GEuLnT3JCMXq3 E+ha39MW4JTX8CXEN9azgEgPA+P7TX6EViZIluXUgLnxr+FMJfpF3v2AxSbymQMAL3Cf 7fde4Ez6cGtruLUJ/CxQWPRMfc94eFEaPDqrtWD3dRcuC9T3TBcHWFW8gL/n12cXKBqq cZ+fAdxuAlh2kppXlRMj+t5JvanjJf6SqYdIAGa/kCinGcxFSoZIuYCnlNQT8fij8W0o jMRQ== X-Received: by 10.180.10.105 with SMTP id h9mr7550327wib.11.1391038781190; Wed, 29 Jan 2014 15:39:41 -0800 (PST) Received: from [192.168.0.2] (cpc19-brig17-2-0-cust25.3-3.cable.virginm.net. [81.101.201.26]) by mx.google.com with ESMTPSA id t6sm9674889wix.4.2014.01.29.15.39.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 15:39:40 -0800 (PST) Message-ID: <52E99136.7080605@gmail.com> Date: Wed, 29 Jan 2014 23:39:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <52E7D67D.1030308@ajf.me> <52E7F55F.7090801@ajf.me> <52E7FCA2.70009@oracle.com> <52E80A0E.7060408@lsces.co.uk> In-Reply-To: <52E80A0E.7060408@lsces.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] some thoughts about php 6 From: rowan.collins@gmail.com (Rowan Collins) On 28/01/2014 19:50, Lester Caine wrote: > The best comment from that is >> The solution is clear: build a full compatibility layer, not a >> conversion tool, into 3.x that makes 2.x code run without change and >> ABRUPTLY stop development on 2.x. What this basically means, is "maintain backwards compatibility, but make it an opt-in feature". > The only problem is should it run PHP5.2 code, or only PHP5.6? Little > things like only supporting e_strict? No, the biggest problem (apart from implementing and maintaining it!) is how to scope this compatibility layer. If you have to turn it on with an ini setting - which generally means for the whole deployment, or at least the whole application - then you still have to have an almighty push to upgrade your application before turning it off. What might be more interesting is if it could be limited by namespace, or by file, or something like that. Then you could include an entire PHP5 library in a project which was otherwise taking advantage of PHP5++ features, right down to invoking a different parser if necessary. I was pondering a similar idea for existing notices - particularly E_STRICT, E_DEPRECATED, and E_NOTICE. The code base I work with relies on some really old PEAR modules, which we're planning to phase out in favour of something else. If we turn up error_reporting, we get a whole load of notices from code we're never going to maintain, drowning out any useful hints in code that was written last week. Of course, to truly solve the adoption problem, the compatibility would have to be 100%... -- Rowan Collins [IMSoP]