Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24838 invoked from network); 3 Feb 2016 16:54:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2016 16:54:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.160.180 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.160.180 mail-yk0-f180.google.com Received: from [209.85.160.180] ([209.85.160.180:35284] helo=mail-yk0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/42-33888-EB032B65 for ; Wed, 03 Feb 2016 11:54:22 -0500 Received: by mail-yk0-f180.google.com with SMTP id r207so24045584ykd.2 for ; Wed, 03 Feb 2016 08:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qAW/HxLhL6NeHHQOIbvDOrgizMQ/qGyLoZvi+AD/eFQ=; b=otvbE40tqMueFyvMa1GbZxsLjxyhpsGr6iDNZ66G8C9Zb6F3PgxZWAGMlsGfOzXni5 K6CtPNoAyJI8Jxmk/dkXO0kO+1aYLi+tZhv8wNkeCYywxf38c9KZ//LgzGFAGjTIIznr q1hsdus9JACKVIA8ElWTXTZIodm6sgv7mei6FCWfa86RH02u9+Rn4w10fHpTVoVrQ+3S gRputXXg6tdUDUwnvNqSk1OI61tzHf9WsVodqTHN+xGaZO+aLcCKVU8bwqREhAaGXm7M 2Yi7YyuGKGavZfkaUHGrEexNNvmbFxbbzDehlqbrmdUed3vzv4gT96xiRSzI3Z9sVFfu xrWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=qAW/HxLhL6NeHHQOIbvDOrgizMQ/qGyLoZvi+AD/eFQ=; b=WvxYNhGqHl3t1X/3ftYwxcZjlkdoYJeYpCpt0WxdwOcS/TqxN8PUqN0p3xmdWCl4ke k/eI8pQA5dGdlmx1tFfMALoeOTdYVOk6D5b306HvCaLgZnE9cpiTMNiyaCqYIPzpcz4G vrpReGLX8xu3/g6JArkknsVBZ99uLA8F++HQEmhd07B1kvoyZ2xE3M10BCjwfQCoUJz2 yaInnTKguYCstoqRJn9q9kG39VpWwXlzz19XS+4VzGaqB+kgVMVcsFwDfabHoX2i0C1e tR9m+KgLJIQtoTDOGu6pJZti6aVNhn1EgTktk2wx1exe6VAXo2xjfPjX+hdF/Tpuhyz7 HPJQ== X-Gm-Message-State: AG10YOT7LbdJSYmXvc4NcNjjvcki87TLAPBYzQaGm+kxfgSwLK6YBezMkFxtRhkIlh3mc6so+lLjGsR7qabQlg== MIME-Version: 1.0 X-Received: by 10.37.2.84 with SMTP id 81mr1581985ybc.15.1454518459369; Wed, 03 Feb 2016 08:54:19 -0800 (PST) Received: by 10.37.83.131 with HTTP; Wed, 3 Feb 2016 08:54:19 -0800 (PST) X-Originating-IP: [78.149.9.228] In-Reply-To: References: Date: Wed, 3 Feb 2016 16:54:19 +0000 Message-ID: To: Davey Shafik Cc: "internals@lists.php.net" , Sara Golemon Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Add PHP_ENGINE Constant From: danack@basereality.com (Dan Ackroyd) On 3 February 2016 at 09:03, Davey Shafik wrote: > Hi all, > > It's actually very difficult to be able to reliably determine that you are > running the _real_ PHP runtime and not something mimicking it. The underlying problem seems to be caused by HHVM deliberately 'faking' the results of calls to zend_version() and the existing constants. What is there to stop any other PHP implementations from returning 'fake' data for that function or these new constants? And just to play devils advocate, why isn't this a problem that should be solved in those other versions of PHP? They're the ones re-using version strings and so causing confusion. I can see how this could be useful....I just can't see how this would be a permanent solution to the problem. As someone else said, this sounds like the old detecting browsers via "user agent headers" for browser detection. That became a complete nightmare as browsers kept imitating each other, and so the rules about strings became less and less useful. Perhaps it might be helpful to justify the RFC, if you can give some more context as to why code needs to know about what VM it is running on? cheers Dan