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

From: Date: Sun, 09 Mar 2014 00:17:11 +0000
Subject: Re: Idea: ifdef-like feature to ease userland BC
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-73019@lists.php.net to get a copy of this message
On 09.03.2014, at 00:44, Marco Schuster <marco+php@m-s-d.eu> wrote: > This helps against API-layer changes, but once you try out new syntax > features (not just yield/goto, but I have stuff like named parameters > or that argument unpacking stuff in mind), then you need a parse-time > filter so that older PHP versions do not cough up on syntax errors. Try out? Why do you need to support multiple versions of PHP when testing some new feature? If you have to support the old version anyhow, what advantage do you gain by shipping the same code twice, just one version a bit prettier? Why would I want to do #ifdef version >= 5.6 function(...$array); #else call_user_func_array('function', $array); #endif instead of just call_user_func_array('function', $array); I really don't want to come across as hostile, but this seems poorly thought out. We all like to play with the new shiny, but I don't see such a feature benefitting the quality of the code out there. Best regards Rouven

« previous php.internals (#73019) next »