Re: Idea: ifdef-like feature to ease userland BC

From: Date: Sun, 09 Mar 2014 08:50:52 +0000
Subject: Re: Idea: ifdef-like feature to ease userland BC
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-73027@lists.php.net to get a copy of this message
hi Marco, On Sat, Mar 8, 2014 at 10:34 PM, Marco Schuster <marco@m-s-d.eu> 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

« previous php.internals (#73027) next »