Fair enough - though I’m not convinced that it would be effective: if 
successful, it would allow people to do 90’s-browser-sniffing-style if ($engine 
!== ‘my favorite’) throw Exception(’sorry, not supported yet’);, so it seems 
fairly likely that implementations would end up lying about it (and yes, 
deviating from the spec) in a few years anyway.

As a side note, AFAIK HippyVM isn’t being actively developed 
(https://twitter.com/HippyVM/status/634347845957627904 
<https://twitter.com/HippyVM/status/634347845957627904>)


> On Feb 3, 2016, at 5:29 PM, Davey Shafik <da...@php.net> wrote:
> 
> Currently, HippyVM doesn't even _have_ a version constant. Because it's 
> trying to pretend to be PHP. Having a "YOU MUST FILL THESE CONSTANTS WITH 
> YOUR OWN RUNTIMES DATA" in the spec is intended to help that situation.
> 
> Right now, there's no way to tell what version of HippyVM you're running on, 
> and to even check that you're using Hippy you need to check for E_HIPPY_WARN.
> 
> We have a chance to standardize, and "mandate" that the information is 
> exposed explicitly, and done so consistently.
> 
> On Wed, Feb 3, 2016 at 5:14 PM, Fred Emmott <f...@fredemmott.co.uk 
> <mailto:f...@fredemmott.co.uk>> wrote:
> 
>> On Feb 3, 2016, at 2:00 PM, Davey Shafik <da...@php.net 
>> <mailto:da...@php.net>> wrote:
>> 
>> On Wednesday, February 3, 2016, Sara Golemon <poll...@php.net 
>> <mailto:poll...@php.net>> wrote:
>> 
>> Unfortunately Sara, the types of things you generally have to work around
>> are minor things, like differences in DOM, or the inability to json_encode
>> DateTimeImmuteable
> 
> 
> 
> It seems like the main thing this RFC would change is that you could easily 
> do “if ($engine !== ‘php’)” - but for almost all the examples I can think of, 
> and yours, what’s actually needed is if "($engine === 
> ‘specific_engine_that_needs_a_workaround’)”, so I don’t see a benefit over 
> using HHVM_VERSION or similar.
> 
> The one exception I can think of is if someone’s reimplementing phpinfo() or 
> similar.
> 
> Regards,
>  - Fred
> 

Reply via email to