Re: Re: [RFC] Add PHP_ENGINE Constant

From: Date: Fri, 05 Feb 2016 20:02:58 +0000
Subject: Re: Re: [RFC] Add PHP_ENGINE Constant
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-91093@lists.php.net to get a copy of this message
On Fri, Feb 5, 2016 at 8:20 AM, Pierre Joye <pierre.php@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". :) -Sara

« previous php.internals (#91093) next »