On Feb 6, 2016 3:02 AM, "Sara Golemon" <poll...@php.net> wrote: > > On Fri, Feb 5, 2016 at 8:20 AM, Pierre Joye <pierre....@gmail.com> wrote: > >> I do however like the idea of feature detection - I wonder if perhaps we > >> could do something where it's done at compile time and therefore minimally > >> impacts runtime? > > > > This could be what you actually need. A #ifdef equivalent for PHP. I > > remember a discussion about adding these features to the core to allow > > to enable/disable portions of a script at the parsing/compilation > > level. Doing so allows mixing codes being valid for various > > implementations inside a same file. It is especially important for > > features using syntax not compatible with a php.net's PHP > > specification (for instance). > > > This usually results in some half-hearted attempts followed by "just > use gcc's preprocessor for that". :)
Yeah, preprocessor (gcc or other) sounds a bit awkward for php while I can understand why one or the other would like to have it. But still, having php code cluttered with #ifdef like codes is not very appealing :)