Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111980 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7960 invoked from network); 1 Oct 2020 19:33:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Oct 2020 19:33:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 293FB180087 for ; Thu, 1 Oct 2020 11:46:08 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 ; Thu, 1 Oct 2020 11:46:07 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id x23so3946109wmi.3 for ; Thu, 01 Oct 2020 11:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=f8N/xxLxH/Txq1IYkpCnM8T74hFUjJJG8tFUBhsloik=; b=hvhjfdEIgc2DK5Mt6U8p4UqnvL1/uIPEiR++o5WybvotybpSeG6xxVNaPht7o2Hb3Z 66qMD86FTi1nGON1TyGFqs4/NB8JEL092a9FH+o7WJ6NqO8QGwRu5+iT8FDmVmJGC+Aj Vz/oQSfOLyhK1fT/9hsS1SGpSauxF8bZGhsYy7vG1kZZHlcUfD/SQXzFccQvRVkY5WIL lESrEtNLqVtqrMBG58GXd7I+nVs9ogTlEgce2aecZcRhUM6QTbUEfGRd5nXVBrBpTWUh ISGQ7aITW+5w71cv8oni0ISX97WgpIhdJbm+3ugBK1ai7rbU3lAs/5TjPQbXJafYL0jz APHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=f8N/xxLxH/Txq1IYkpCnM8T74hFUjJJG8tFUBhsloik=; b=SK33uVaSKsGTvKAU27Y1F6K9smYW7k3cQYP5AuaecYz3ZdQaj/Um+vlo9AuVu5a3IS sKYS27Y2bLREZ4e16EBC3BqSoumw/DVRVFplrWcJvSBmVLDPDKOM7B4YCYbh8C8YacyX 9gXwhTE0UcqSybR1yGdiA7lbdpRMAsiKLoX4SRHZI+JGkjY1239csTPEbK9BNk6MhKRC D3D1AuTG4+hPXabvFdN/xTlLkf0HH2TiAe1neUqDzehNvyWf4VegnzdELERh0Tl6YsvY 1Zt+fg8BquaKAo+vj7wXr37J57nrM0Y0xSjK8NYq54o1ks+z6094KUfbnSAzr/JAlIZs KigA== X-Gm-Message-State: AOAM531G5WdqShZ7dpyT6WqaJVNT+D0siq/OYvktyp9p1p17X0EvZmNL dtv45so/j2qHmvpbt9qFoTHmlSH1DuM= X-Google-Smtp-Source: ABdhPJyhdZXtqi/lz4enXFhD4dZ1ltJ7kTciaqcVo17jIR4hQHklKrab4uYpv9gHpkjh/5rtw8DMfw== X-Received: by 2002:a1c:1f08:: with SMTP id f8mr1397032wmf.168.1601577965441; Thu, 01 Oct 2020 11:46:05 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id a5sm10421335wrp.37.2020.10.01.11.46.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2020 11:46:04 -0700 (PDT) To: PHP internals References: <940131FA-19B3-406C-8982-0AD276FD1879@gmail.com> Message-ID: Date: Thu, 1 Oct 2020 19:46:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: [PHP-DEV] RFC: execution opcode file without php source code file From: rowan.collins@gmail.com (Rowan Tommins) On 01/10/2020 15:23, 肖 鑫鑫 wrote: > 1. Opcode binaries can be published when binding to a PHP interpreter > (version dependent) release product, rather than just the PHP source > code(for example, JAVA and .NET is version-dependent) Just to clarify the comparison with other languages: - Both the .Net CLR and the JVM are designed to be backwards compatible, so that an assembly / class compiled for version 1 should run without re-compilation on version 2 (but not the other way around) - Until recently, the .Net CLR was a very stable target, which had gone through only 4 versions in nearly 20 years (confusingly numbered 1.0, 1.1, 2.0, and 4.0) - The JVM is specified independently of the Java language, and has multiple interoperable implementations This is very different from PHP OpCodes, which are not documented outside the engine's source, and have no provision for backwards compatibility. Not only are they likely to change between annual releases (e.g. 7.3 to 7.4) but a change in 7.4.23 could conceivably change the VM in such a way that code compiled on 7.4.22 would no longer run correctly. The Python .pyc (and .pyo, which is just a .pyc created with optimisation turned on) is a better comparison - like PHP, it is an implementation-dependent bytecode, although it appears there is some guarantee of stability between bugfix releases. Its primary use seems to be accelerating runtime on a single machine, not distributing a binary elsewhere, and OpCache already provides that for PHP. Regards, -- Rowan Tommins (né Collins) [IMSoP]