Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95885 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13418 invoked from network); 10 Sep 2016 01:00:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2016 01:00:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.220.175 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.220.175 mail-qk0-f175.google.com Received: from [209.85.220.175] ([209.85.220.175:32990] helo=mail-qk0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/FA-46544-91B53D75 for ; Fri, 09 Sep 2016 21:00:09 -0400 Received: by mail-qk0-f175.google.com with SMTP id w204so95483894qka.0 for ; Fri, 09 Sep 2016 18:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=45833feOt+KpOBJafJ6rYPSOpgNvwZJ5W7XNsTUJJgE=; b=br4dm/Mbe73W0/Z7aF4Eg8q94HcxjZBueVtFyrYzl4Cus9OfYlvCWZqy1inA00qwOt jIl1+TeQUfRmIpfF0QshG0+yDG70yEKRc7ipT0cutvrs/SSnUcZ5PVnpKD7SlIGDzWAM ScuFpjggnEqp6LZNe3OH0p8SVUlqx5W9Waz8xaBJrF1CAdZtBfPqEotVma2e2U96xnyM Om9nr1vrtr+/XD7pY2/8MI0gaJ/biZC6xmcvcM5bAk328yiOprueczB3FLZKaOz5wAXi BUb72Hb/nUcsQPhotjVpDQikzmfNg+Prkj4G7TWMtKwouUUmTxeJuXKrgR7qmWIQC3jM RejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=45833feOt+KpOBJafJ6rYPSOpgNvwZJ5W7XNsTUJJgE=; b=Z0e05ECOHriFYLC/AtAq6yrDsX0O7cHwvenPIPECDLLyqYHDnXJcmhUF8ag8LFQS6b +2F7+rxngjqiGEVdHJx3kNGJfJKTaW6svcqwmYqO5vLOftMYDidPSuWAaDV8m4XedV/Y MMKje8FQmYXP7EDyFNPjuA6x8Rqx+TngVbGIJ3N0vUkRVAV24ehre/m9KqJ34dITgizz gU+rqiSPZcx4KKKfoDmaPwBPDs4SRuj/eWFPEhhwg8HhqeqgWlYfVtrBxyWiQGKDa82Y 0lhFgH+ZJ4YFrP8zOBslELuJRq/JPHslvlI3BQaEsVPipd9SkVwDv+5KiVAKku5L5B79 /W5w== X-Gm-Message-State: AE9vXwMx3aI73/k80iuYGRUmDa5icEzBdcwJI6obsMPaCY+eBXq8KzG+6vy4W3TjrtVIMZvuDYUsIdIbvf/Yn06z X-Received: by 10.55.214.68 with SMTP id t65mr7992990qki.216.1473469205444; Fri, 09 Sep 2016 18:00:05 -0700 (PDT) MIME-Version: 1.0 Sender: me@daveyshafik.com Received: by 10.200.54.251 with HTTP; Fri, 9 Sep 2016 18:00:04 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Sep 2016 18:00:04 -0700 X-Google-Sender-Auth: YgK5lji2FdyJnFQmggalm93RnUc Message-ID: To: Kalle Sommer Nielsen Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1149a728946f7e053c1cc853 Subject: Re: [PHP-DEV] [RFC] [VOTE] Add PHP Engine Constant Identifier From: davey@php.net (Davey Shafik) --001a1149a728946f7e053c1cc853 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Kalle, My use case is for the php7-mysql-shim, some of the error messages I duplicate and therefore have tests for, are different on HHVM, meaning the tests fail. The messages aren't in the spec, so they're not failing to support the spec, and it's unlikely to affect functionality =E2=80=94 which is why I si= mply skip the tests on HHVM. This detection is much harder in Hippy, and who knows what other existing and future engines. Also, what happens when we get engines that are good candidates for say, multithreading, and we want to change application behavior on that engine automatically. There are tons of places this _may_ be useful, and there's zero impact to adding it. - Davey On Fri, Sep 9, 2016 at 5:42 PM, Kalle Sommer Nielsen wrote: > Hi Davey > > 2016-09-10 1:49 GMT+02:00 Davey Shafik : > > Hi all, > > > > As noted last week, I'm now opening up the vote for adding a PHP Engine > > Identifier constant to PHP 7.2+ (and more importantly, to the language > > spec). Additionally, there is a second vote to add corresponding > > PHP_ENGINE_(*_)VERSION(_ID) constants. > > While I understand the reasoning behind it, I do not think that it is > our problem to solve, whether we do if(defined('HHVM_VERSION')) or > if(PHP_ENGINE =3D=3D 'hhvm') seems irrelevant to me. If code are not > compliant with the spec, then it should be that implementors > responsibility to make sure that it is resolved imho. > > I do not have anything against HHVM or alternative implementations of > PHP, it rocks, but I think we need to look in other directions, as it > shouldn't be needed at all to check for what runs your PHP, it should > _just_ work. For syntax incompatibility, then we can't even filter out > other implementations with a constant thats executed at runtime > either, not that I believe it is a major issue, but it is something to > consider too. > > Hence my -1 > > -- > regards, > > Kalle Sommer Nielsen > kalle@php.net > --001a1149a728946f7e053c1cc853--