Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95704 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29873 invoked from network); 6 Sep 2016 20:32:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2016 20:32:58 -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.217.180 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.217.180 mail-ua0-f180.google.com Received: from [209.85.217.180] ([209.85.217.180:34318] helo=mail-ua0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/22-18051-9F72FC75 for ; Tue, 06 Sep 2016 16:32:58 -0400 Received: by mail-ua0-f180.google.com with SMTP id u68so40462067uau.1 for ; Tue, 06 Sep 2016 13:32:57 -0700 (PDT) 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:from:date:message-id:subject:to :cc; bh=Vd0VcgHVpYdYZeJq62i5WK2J8Z4TAUURKDiJsO9iMd4=; b=YRaIHzKlNu+CUf2d4rm0b3LldBWAfBLknNz71Ze7Zmn7uBzAouCaI+AFBDh6N0EDqc DNGyBxOLDmqH+KIeNMwQm3hrDSULWuHTOqwnDbz0oGiZQnlaBixrL/CBtHh+s1t3mg/T BD8PbSKY23gClErIoFehJykwXSzyRALcmlH0QuU5FC7CIE+8QMmBMbwWG/nm+Sm+JIqs KnF7zkDKd/RuMQXxCu9rKNI0ovh9odJ09EbFqmwyCVWuGXuUvOjzV1/KPsV/zF4cLleh F30EX8jI5G8EZczHfJ3etFr3fRcWjpFE22WIqNUFRAYw1XNY2+SkdF1zUfTmrv2A+6Bv YpJA== 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:from:date :message-id:subject:to:cc; bh=Vd0VcgHVpYdYZeJq62i5WK2J8Z4TAUURKDiJsO9iMd4=; b=hiMTB80+cC6Si3zRYHxXzZmLEPWglD2djDAF46qO6C0j5dzgYqI2TV17pYYxA2c9E7 luL00uBE0ZhVifQJWP/qtHHlaKHdinLUWX6di5x+0tggHQtAeO6Jy8uP63kYfhzWA9TY S6nE93rZe4TTlG9WSxhWOTMH9ckCmNdR22Lu2+BotIz44OkrB+HKUslfG0X6aDYa8Pix +bwnq6uhElgROhyT+ofJ1P8JEXKUTuuuAGOPHSG8cKZH306mNkAwsUyBvS1Tn00FBk0X 794j9HxLfcERTv6u71kmW6T7eeNj9X26QCi8ajHzwxI7AQBi+i3zQBIzeESkZFNJmz4y ttUQ== X-Gm-Message-State: AE9vXwP+h284eVyl58AQba6QnpXra+HqznroM8YSX2sX4to4mOXL7UReP9ky9cN5h6jbcqtnuwCP+xY8/P6bZA== X-Received: by 10.176.69.102 with SMTP id r93mr11977237uar.156.1473193974347; Tue, 06 Sep 2016 13:32:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.69.4 with HTTP; Tue, 6 Sep 2016 13:32:53 -0700 (PDT) X-Originating-IP: [78.145.254.9] In-Reply-To: References: Date: Tue, 6 Sep 2016 21:32:53 +0100 Message-ID: To: Davey Shafik Cc: Andrea Faulds , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [PREVOTE] PHP Engine Constants From: danack@basereality.com (Dan Ackroyd) On 5 September 2016 at 19:43, Davey Shafik 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