Re: [PHP-DEV] Re: [RFC] Add PHP_ENGINE Constant

2016-02-05 Thread Pierre Joye
On Feb 6, 2016 3:02 AM, "Sara Golemon" wrote: > > On Fri, Feb 5, 2016 at 8:20 AM, Pierre Joye 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 cou

Re: [PHP-DEV] Re: [RFC] Add PHP_ENGINE Constant

2016-02-05 Thread Sara Golemon
On Fri, Feb 5, 2016 at 8:20 AM, Pierre Joye 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

Re: [PHP-DEV] Re: [RFC] Add PHP_ENGINE Constant

2016-02-05 Thread Davey Shafik
As an aside, having this kind of #ifdef type stuff also allows us to write forward compatible scripts without worrying about invalid syntax breaking older versions. On Fri, Feb 5, 2016 at 11:20 AM, Pierre Joye wrote: > On Thu, Feb 4, 2016 at 2:00 AM, Davey Shafik wrote: > > On Wednesday, Februa

Re: [PHP-DEV] Re: [RFC] Add PHP_ENGINE Constant

2016-02-05 Thread Pierre Joye
On Thu, Feb 4, 2016 at 2:00 AM, Davey Shafik wrote: > On Wednesday, February 3, 2016, Sara Golemon wrote: > >> > I think Dan raises some interesting points, although I think >> zend_version() >> > is often used for feature detection so they try to put a zend version in >> > there to be helpful i.

[PHP-DEV] Re: [RFC] Add PHP_ENGINE Constant

2016-02-03 Thread Davey Shafik
On Wednesday, February 3, 2016, Sara Golemon wrote: > > I think Dan raises some interesting points, although I think > zend_version() > > is often used for feature detection so they try to put a zend version in > > there to be helpful i.e. HHVM x.y.z === PHP a.b (feature-wise). > > > That's exact