Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91069 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55350 invoked from network); 3 Feb 2016 21:51:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2016 21:51:36 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.48 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.48 mail-pa0-f48.google.com Received: from [209.85.220.48] ([209.85.220.48:36777] helo=mail-pa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/E2-34960-76672B65 for ; Wed, 03 Feb 2016 16:51:36 -0500 Received: by mail-pa0-f48.google.com with SMTP id yy13so19846131pab.3 for ; Wed, 03 Feb 2016 13:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=GGO4/qrsJFB+MLPjoTMtj9B61rjQYEjbVvGcvc0ab1s=; b=0wrArzv3l36lBSj06EVecOFwsj+lW+2xjyX1CzT3gynUhnelqeJQ46w+i2B5ei8H6z GrMa6N+xlz0tos5RIeTaIC4O/D2ejSRlfayJj3vmMKDCbuQGi5oTEjUPvh2MggcMLXLI spmauSKlPoOyjydLrJlKkscOMkEe8PX/Reod9E6IIDupd8ryVeWmHGz/4Ot7fvJ6rTPZ f2evPvbvuanBrohWNzamS+8m705JWAecaRVjAqTL2yYF5z90dxQD/iQvPiYR3HpMUTAv pWhyymzOf2quOka9ipO2jT1vaoY67Bs2kEaaHhiI2Iezz5n8DlxWcK+4X8mbnvIT4IHp bbtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=GGO4/qrsJFB+MLPjoTMtj9B61rjQYEjbVvGcvc0ab1s=; b=Y432qX2xDWcj5WMLPKH0l7Vn4KcclvDSB6nnCVilcOTqkuwqqbgRCnEq6zphIOhun0 NFYBjyNRVs5sBpsHXrgYJf4zDnuiM4WYfzOhHbkfPGw0numnjT+Gao4OkhT+22hz8Alv 8lA0HPtmErtoheBz2oOa0usiWZj+KU9V7iXjOeK9+/Hd7ifccNLvRtBitMtAQNJDQyl2 EZEcpM1lmxnQM/wcXQJ31ThOgJNgw+hUgT95yz0qFyNX8/UOKClijvdiNM6wIbOdOcIz 1mq1M64RRCCo2MP/8tnJMVU7DgZ6K1srOkbhjZmhuFo7EUlURRaSAvMmqC8Vc7x6LmK2 kocQ== X-Gm-Message-State: AG10YORfDyXtoeBwB2uNP6RzFvwKZjIpftnwHYbVdDCemVxyFYePE90+bXkca2LYPSnBwA== X-Received: by 10.67.14.136 with SMTP id fg8mr5864726pad.105.1454536293307; Wed, 03 Feb 2016 13:51:33 -0800 (PST) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id lt14sm11941377pab.39.2016.02.03.13.51.32 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Feb 2016 13:51:32 -0800 (PST) To: Sara Golemon , Matt Prelude References: <56B233C0.10301@mprelu.de> Cc: PHP internals X-Enigmail-Draft-Status: N1110 Message-ID: <56B27660.60001@gmail.com> Date: Wed, 3 Feb 2016 13:51:28 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Add PHP_ENGINE Constant From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >> there to be helpful i.e. HHVM x.y.z === PHP a.b (feature-wise). >> > That's exactly why PHP_VERSION is faked in HHVM. Because that's how And I think it is the right choice. PHP_VERSION essentially (also) means the version of the spec and of the implementation. And people do depend on it (despite better solution being to check for specific feature, but it's not always easy). I think having also HHVM_VERSION is enough to both detect HHVM and check for specific quirks if necessary. If you have another implementation, like Quercus, I'd expect something like QUERCUS_VERSION. > I would actually suggest that if something like this RFC goes through, > we formally define PHP_VERSION in exactly that way. As a language > specification conformance advertisement. PHP_ENGINE_VERSION would be Well, the thing there is that the spec does not define the library, and a lot of things do depend on library. So sometimes PHP_VERSION is also used to check for something we've added in minor version, and that won't be in the spec. > class ReflectionLanguage { > public function isSupported($feature): bool; > public function variableSyntaxConformance(): string; > public function strictTypehints(): bool; > } Yes, but would we add there something like "does foo_bar($baz, $zoo) support second parameter or not yet"? Or "is that annoying bug where bar_foo didn't support Unicode strings fixed or not?" People use version for that too. -- Stas Malyshev smalyshev@gmail.com