Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91073 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62683 invoked from network); 3 Feb 2016 22:37:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2016 22:37:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=fred@fredemmott.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=fred@fredemmott.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fredemmott.co.uk from 209.85.160.179 cause and error) X-PHP-List-Original-Sender: fred@fredemmott.co.uk X-Host-Fingerprint: 209.85.160.179 mail-yk0-f179.google.com Received: from [209.85.160.179] ([209.85.160.179:33414] helo=mail-yk0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/54-34960-81182B65 for ; Wed, 03 Feb 2016 17:37:13 -0500 Received: by mail-yk0-f179.google.com with SMTP id z13so32316654ykd.0 for ; Wed, 03 Feb 2016 14:37:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fredemmott-co-uk.20150623.gappssmtp.com; s=20150623; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=shF2u6e40poH/XUVuw5To3gaFj8DMk/zPBHE2jOFofQ=; b=vTNYgtKAPg2UwwA5bZWfiG/7SnI2k1FaPCPGYiQgk/gGpoQ/OtHl9sQIYXWAZfXwbH bPDG1RC/L1Gparg80BJKBKliG7jgQ+QsmHKNfDBx/CE9ng/tFwXDhAMzr/7nHlQs3yG7 CDlqhQuhrx2CMRd0Owz/4DVxiRF0WsUsLE/vriuRwiDaxUjDn9qjdEHOrWwCOpbKDbT/ ef7cxGKM3/GwfeErGKEySOerdp/A7jy+j/toKTTPlorw/TmHKNznYnOHb2gGwIpudea5 7JbJjGgJBPA2C1VoC/jmE3t9LqUCV1tS/QZ1tkHyudRsatoX6WIzwMVNzat3lzBkCZ7A X3Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=shF2u6e40poH/XUVuw5To3gaFj8DMk/zPBHE2jOFofQ=; b=OjP/UlAStjfLN341ABC4Do9QWHCepIHdxN3S1Klmzah5vrZJqzBjmzzkB16j4B96MK Z+WNSE+5hkkCs6KxW5r6Sjn1yF3m2X36HNn4yyPgQsJix6M6WDUMC35fxL94GL4hh2NE bG8sTN44b33nynFm8Pfvw1hslAyppsrPIG5CYPZCc69Up9BPIK48X8FoQO9hu1JXIjyD 3cw2Blq5nvmmHaw8ukOzaBnQRNmsbBbHfbOrFs42iIpD7sDh+CGw6gotFX+2Sp/F4zKa BG9QL3GjnwGHY1Jdg7vJMdwlgaOYRmrIsl4M/SSqpPUdSRdyg4PijQNaOR2IGaWJNqtR 1XSA== X-Gm-Message-State: AG10YOSWI45Szm643gUsfifI916pWIYQYd9oIq9Gmq/28eNpXH0PN5nqTAD0iXdru0+kYw== X-Received: by 10.37.231.86 with SMTP id e83mr2248856ybh.141.1454539030240; Wed, 03 Feb 2016 14:37:10 -0800 (PST) Received: from ?IPv6:2620:10d:c0a3:10fb:bae8:56ff:fe43:db38? ([2620:10d:c091:200::b:137b]) by smtp.gmail.com with ESMTPSA id z18sm4863723ywd.37.2016.02.03.14.37.09 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Feb 2016 14:37:09 -0800 (PST) Content-Type: multipart/alternative; boundary="Apple-Mail=_2DA5B687-44C0-4F0F-B345-006B4F19F9DE" Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Wed, 3 Feb 2016 17:37:08 -0500 Cc: Sara Golemon , Matt Prelude , PHP internals Message-ID: References: <56B233C0.10301@mprelu.de> <216F291E-F174-4E07-B650-DC9A63C07F61@fredemmott.co.uk> To: Davey Shafik X-Mailer: Apple Mail (2.3112) Subject: Re: [PHP-DEV] [RFC] Add PHP_ENGINE Constant From: fred@fredemmott.co.uk (Fred Emmott) --Apple-Mail=_2DA5B687-44C0-4F0F-B345-006B4F19F9DE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Fair enough - though I=E2=80=99m not convinced that it would be = effective: if successful, it would allow people to do = 90=E2=80=99s-browser-sniffing-style if ($engine !=3D=3D =E2=80=98my = favorite=E2=80=99) throw Exception(=E2=80=99sorry, not supported = yet=E2=80=99);, 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=E2=80=99t being actively developed = (https://twitter.com/HippyVM/status/634347845957627904 = ) > On Feb 3, 2016, at 5:29 PM, Davey Shafik wrote: >=20 > 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. >=20 > 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. >=20 > We have a chance to standardize, and "mandate" that the information is = exposed explicitly, and done so consistently. >=20 > On Wed, Feb 3, 2016 at 5:14 PM, Fred Emmott > wrote: >=20 >> On Feb 3, 2016, at 2:00 PM, Davey Shafik > wrote: >>=20 >> On Wednesday, February 3, 2016, Sara Golemon > wrote: >>=20 >> 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 >=20 >=20 >=20 > It seems like the main thing this RFC would change is that you could = easily do =E2=80=9Cif ($engine !=3D=3D =E2=80=98php=E2=80=99)=E2=80=9D - = but for almost all the examples I can think of, and yours, what=E2=80=99s = actually needed is if "($engine =3D=3D=3D = =E2=80=98specific_engine_that_needs_a_workaround=E2=80=99)=E2=80=9D, so = I don=E2=80=99t see a benefit over using HHVM_VERSION or similar. >=20 > The one exception I can think of is if someone=E2=80=99s = reimplementing phpinfo() or similar. >=20 > Regards, > - Fred >=20 --Apple-Mail=_2DA5B687-44C0-4F0F-B345-006B4F19F9DE--