Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73013 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69387 invoked from network); 8 Mar 2014 23:00:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2014 23:00:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.176 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.216.176 mail-qc0-f176.google.com Received: from [209.85.216.176] ([209.85.216.176:51935] helo=mail-qc0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/A3-44862-311AB135 for ; Sat, 08 Mar 2014 18:00:36 -0500 Received: by mail-qc0-f176.google.com with SMTP id m20so6181352qcx.21 for ; Sat, 08 Mar 2014 15:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=HyxmYiTedKbGrJK+0G92Gtju0YXKqokk7HR4qQVB98A=; b=K87fvUCGKTY6iuzI4UDEv9YTMqDMpeDPo+z/h8MBNIhR1IUvkLzu2z5w4fZGusRPei FlfOQNnOwctlebnWOuk1/04v6G1v/Y7o/uMzjWKB/i5mgKxpZnCB7O/V1+S0j7TWToJe YHF2XKMRDJxIic0l32RsEg4wanq3mdmQZVdQ+Wxq60NcqJt84R9sOADpQ6dkliHSmkyW e0C+j3rH+k8VPqilKXUjeioxglwTXgubN2jE8oroZBrRt73aRTk1Y2yTtuLHZmlJDeDo XOYMdvMCegIVQI5sXGFqzoMc48m9kaI3cUKU3jAsZiwSj/KkSj0JkHMUXaeYKUm6I36Z nmqQ== X-Received: by 10.224.165.133 with SMTP id i5mr31502511qay.75.1394319633131; Sat, 08 Mar 2014 15:00:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.85.18 with HTTP; Sat, 8 Mar 2014 15:00:13 -0800 (PST) In-Reply-To: References: Date: Sun, 9 Mar 2014 01:00:13 +0200 Message-ID: To: internals Content-Type: multipart/alternative; boundary=089e0149c6c06fae6904f420569f Subject: Re: [PHP-DEV] Idea: ifdef-like feature to ease userland BC From: arvids.godjuks@gmail.com (Arvids Godjuks) --089e0149c6c06fae6904f420569f Content-Type: text/plain; charset=UTF-8 2014-03-08 23:34 GMT+02:00 Marco Schuster : > 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. > > Marco Hello Marco. This really sounds strange. Why? Because you already have all the tools in userland to do all that since like PHP 4. You have "function_exists" http://lv.php.net/manual/en/function.function-exists.php , you have "phpversion" http://lv.php.net/manual/en/function.phpversion.php, you have PHP_VERSION_ID constant (details about the constant are in http://lv.php.net/manual/en/function.phpversion.php too), you have version_compare http://lv.php.net/manual/en/function.version-compare.php Sometimes you just need to look up the actual manual... Arvids. --089e0149c6c06fae6904f420569f--