Re: Idea: ifdef-like feature to ease userland BC
| From: | Andrea Faulds | Date: | Sat, 08 Mar 2014 21:40:07 +0000 |
| Subject: | Re: Idea: ifdef-like feature to ease userland BC | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-73009@lists.php.net to get a copy of this message | ||
On 8 Mar 2014, at 21:36, Marco Schuster <marco+php@m-s-d.eu> wrote:
> 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?
Why is that needed? PHP checks function names and arguments at runtime, not compile-time. You can
already do this:
if (some_condition) {
PHP_5_6_function();
} else {
PHP_5_2_function();
}
--
Andrea Faulds
http://ajf.me/