Re: Re: [PREVOTE] PHP Engine Constants

From: Date: Tue, 06 Sep 2016 20:32:53 +0000
Subject: Re: Re: [PREVOTE] PHP Engine Constants
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-95704@lists.php.net to get a copy of this message
On 5 September 2016 at 19:43, Davey Shafik <davey@php.net> wrote: > > Instead, it would be better to check PHP_ENGINE === > 'hhvm' && PHP_ENGINE_VERSION_ID <= 30813 And then when the next people who want to build an alternative engine come along, they will include this constant, to make their engine as 'compatible' as possible with the current PHP engine. i.e. adding this doesn't provide a way of telling real PHP apart from something that is copying it. > Then you need to check for HHVM_VERSION So...that sounds like the correct thing to be checking for. Test for known "almost but not quite PHP" engines, otherwise assume that you're running on real PHP. cheers Dan

« previous php.internals (#95704) next »