On 5 September 2016 at 19:43, Davey Shafik <da...@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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to