Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111443 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92829 invoked from network); 10 Aug 2020 17:20:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Aug 2020 17:20:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE8C0180547 for ; Mon, 10 Aug 2020 09:19:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 10 Aug 2020 09:19:30 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id t23so10246016ljc.3 for ; Mon, 10 Aug 2020 09:19:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p2+kwU0LhT3JCDy9Ux98RHc0n6Wmo9gqxUuSeXLhKek=; b=Agq4qR5QMmKo3e8O0y1fKeUqWvhDeUG6KtD6Zl0Mf2tIUUtNUF2XfJ2AbDsTGTxONb jhNne+WI2PKmWn2XbSOigULqheLEBgeYCGv5zJ0coxwrmeres8cjv72g/9EyLVKd18vM bkIuT7AYx3CdS7HoVqgSkrE4pNXzG5gFW4zcjvCdWKruLpRC/A0KkvpQVS8YOIKvf0WF rDvOWSo7Yj1ApQYreLk9BmhXERQ1zPY7I62+FuRyab/J/ip9VYv8t6tsOWmQmknph5Gy KJIZpRc3XleKKbyB+29QlnrNqr3yDm2NMhfD7smOlTkCLn0/jETJ9stNQ1X/c9e93UP6 2M/g== X-Gm-Message-State: AOAM530OWEoB9FSrCU5nmK6bK5RmCYSiNIgnhljyVKWn+GyCWF/YO781 W6lZSWtc5P2m8k24Z14c5ElUZgqOS5ORp7cCO2swtg== X-Google-Smtp-Source: ABdhPJxKkhx8sBBCWwxvslIqE3ohXptAPwC/dolm2JgPSFwZG++aTvDlXvK7zzwLxd7aZucGr8TUCTaEK38dxAYbB/k= X-Received: by 2002:a2e:9a03:: with SMTP id o3mr993647lji.48.1597076367292; Mon, 10 Aug 2020 09:19:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 10 Aug 2020 11:19:16 -0500 Message-ID: To: Nikita Popov Cc: Philip Hofstetter , PHP internals Content-Type: multipart/alternative; boundary="0000000000008d4f8805ac885166" Subject: Re: [PHP-DEV] ZEND_ENGINE_4 define? From: pollita@php.net (Sara Golemon) --0000000000008d4f8805ac885166 Content-Type: text/plain; charset="UTF-8" On Mon, Aug 10, 2020 at 2:37 AM Nikita Popov wrote: > On Mon, Aug 10, 2020 at 7:57 AM Philip Hofstetter < > phofstetter@sensational.ch> wrote: > > In many cases, I've been using the ZEND_ENGINE_3 define to handle the > > PHP 5/7 difference. > > > > Now, the Zend Engine version seems to have been increased to 4 > > I would recommend using PHP_VERSION_ID. > > I have no idea why we have the ZEND_ENGINE_3 constant, but it seems like a > pretty bad idea. Now that we are at ZE 4, should we drop that constant -- > and break all the code using it? Chances are that code guarded by > ZEND_ENGINE_3 is also needed on all versions of ZE going forward, not just > ZE 3 in particular. I think we should just leave teh ZEND_ENGINE_3 define > around, but make sure not to introduce a new one of that kind. > > I agree that ZEND_ENGINE_n was always a weird constant, and IIRC we had the 7.x series export both ZEND_ENGINE_2 and ZEND_ENGINE_3. Not sure. (and the fact I'm not sure is also telling). This is probably much more expressive: #if PHP_VERSION_ID >= 80000 If one *really* wants "Zend" versioning, you similarly could do: #if ZEND_EXTENSION_API_NO >= 400000000 How many version indicators do we need? --0000000000008d4f8805ac885166--