Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:131032 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 96F501A00BC for ; Thu, 28 May 2026 06:36:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1779950185; bh=7p/3/yIo10SiRBVvOc8FTIWoQO36YQtKY8QOfmMHju4=; h=Date:Subject:To:References:From:In-Reply-To:From; b=CEpzTcwN2XOi9ebePwiG+wUG/1DXsN+gnRR1kwqZ7F15jFml0H4CX3OLSvBovRL1C QY7swHBb80vrjykDO03Xk/66O0swNaAx4EdWSLp3wx/XrWJ0BVF6FS6Gx3JsXUa7Ng R6y5JJOiGrnr4qE41sZmx3LMdb68Q+ndy3xwR732jo/4Fu5qB+qWoZqz5n/6aUW4E2 6vTZ+vRUWU4Y1pJLEFfolYOQ46g255KD8kFelTUt9kJihBZoIcpilMYTfEOrCTlVl4 IZGFQCneoqdle+QIX/yfRy5WV93e9VWAhgLI9rdNaWCCgUpYhPCCE4AmDESCrQnFlc LBVfg6tIsdN3g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4F16E180040 for ; Thu, 28 May 2026 06:36:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 28 May 2026 06:36:24 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-45ed9336049so2063560f8f.0 for ; Wed, 27 May 2026 23:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779950178; x=1780554978; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=pVHgFdTH2CGGlgj7jFpGVdOKVuzA25Si+9chXaUD/N8=; b=TH0OAMInDQZj/aD8uZNtzLKMLHBxclTBGRuFHv69Z7OB/TlEY1IytOVxIseEoh8wyc Uul6JQ47EAo+0NE3Fv17VrjgL3oqABTONtpisO5tbg8SGGmfKjzlvZUtRbdSekPscwp+ rVX6+Z7wcodHVvr1hPkn1BvY9TjyYhlpZi8bLbW5UM95U2p3ffc2E686WN7GlaF6lsCN Tov8zvhyyeAJrzPXkejJzda6JbI1YgzS7IW+kJzIUH049PeUvaTAsltN0WtU4/qwhjKv aBFDkQ/RyN3tvgrM+kuE5ObUfoEn0xXWVGI2lac5Z4f5y3Sf7n1Jg16ilta7hCPpNsmq n1gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779950178; x=1780554978; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pVHgFdTH2CGGlgj7jFpGVdOKVuzA25Si+9chXaUD/N8=; b=tHBCJT00kCQBnAn8DfOBIcpgb83jWgGozm+4nDlv17hNeoIwJ2MrOG5A1SZzp/4kY7 H1airaCvYy4+p/BHUkGbUhOZbktMxt3L1afj2TCNf3njAjVQrx9j2umXc4JY2ZX5gXWc 131UKi8mqXvK7GrJg7Zj1MwF/ytVlWXqzSJoRACdoVwn5JmmIdBBMDlOwj83uMfFaQH+ H5sIpQgwti0ACd0dX5JLhncmAbb3HEWruq76Vv379Tegvhxl855tLY/2wlWmBTfRcgQs WqRnvVBadqi/yuMQqhYq9l2/Sh9zgdJdAl+BRcS+LrMWVDA0dzvyqsLwC6neDCH6PCc4 /8oQ== X-Gm-Message-State: AOJu0YzsYFdv2X1+XBB8Bnyf5hpUJA55ADibdaG7rt3PnKVLz9mNsLRj 3YHiKXLTdEQavKIAZB56lxZoWODJVvljkeGQDL1wuwJ8GYhvAnoV1INpnDAvyg== X-Gm-Gg: Acq92OFCzmZy4zoiyq7CjhXUZR04lI7ewaR6WKqOgs0v5oXpQIWeHeP1O42I5/9DOc6 l7wN3G8Sxv7L2cjZRtZNQSi31BwreKRZ7XFzY/qNLebfcEcUET7fNwJ2hTQ34fiRfyxTf29Q7KT JvBG8KGi9RvgHmAAZhPgekqXoEcg+3qoN8dzC+9IsVWIGLrYLUoIdsAHbRVoxWBlcTsSKYL+Ml9 dJrqDEZbhjVb/OIqlZuVd9i4liwshzibfe66UiItXFZih+nxmWykacC/yqmRQ0ZUA03jvNGjWH1 6FPG8aeQs/gfTCx4UzA0HFnFhwNsxiBt7+NdsOzOSrR7nKYyLqcs/MLyDiZD7RNCv9n8aUWKV5Q RVXYj2CNVgSpJJK5KvclcbpNQa48A1FmI7hRy5rnc8nWqPDGrJSNI+IXLq7RhhbJIglduBZ2yGy xsjvRGDiuEisMHKkmAv7dpptA5OXcZt+OaGphw+X5o6QVJAYxrhd7Ijf8DhwEQIhX9E1F5OyYz/ g1HuuH5UzfcbtdjquodF2riENoq X-Received: by 2002:a05:6000:470b:b0:45e:8547:f217 with SMTP id ffacd0b85a97d-45eb38a6bcamr42976980f8f.37.1779950177651; Wed, 27 May 2026 23:36:17 -0700 (PDT) Received: from [192.168.153.252] (laubervilliers-656-1-64-146.w82-127.abo.wanadoo.fr. [82.127.89.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ee91c34bfsm2549718f8f.2.2026.05.27.23.36.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 May 2026 23:36:17 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------k5egc329tgrRqg1NET8Y467c" Message-ID: <690e2bc4-d6c9-488b-bbd7-0010437f6c15@gmail.com> Date: Thu, 28 May 2026 08:36:15 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [Pre-RFC] Pure-code source files via .phpc extension To: internals@lists.php.net References: <9E95EA03-B86A-D248-A980-B1E838F94C13@hxcore.ol> <20260527131921.086BB1A00BD@lists.php.net> <8AE9A269-2E40-42F0-A0F8-C6690B2935FE@gmail.com> <20260528023149.C97961A00BD@lists.php.net> <76D39851-7DAC-4F56-9615-B98B0A918770@gmail.com> <20260528043224.2CDD51A00BD@lists.php.net> Content-Language: fr In-Reply-To: <20260528043224.2CDD51A00BD@lists.php.net> From: pierstoval@gmail.com (Alex Rock) This is a multi-part message in MIME format. --------------k5egc329tgrRqg1NET8Y467c Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 28/05/2026 à 06:32, Ben Ramsey a écrit : > On 5/27/26 23:02, Hendrik Mennen wrote: >> >> I am trying to understand whether your objection is to extension- >> based dispatch specifically, or to the broader idea of the engine >> making this decision at all. >> > > I don't have a strong objection to the engine making this decision, but > I'd like to hear from others first. > > Cheers, > Ben I think this can be summarised with this: * File extension cannot have a "meaning" for the engine, as the engine does not care about it at all in the first place * All SAPIs will consider a "normal PHP file" as default input, could it be CLI, mod_php for Apache, or anything else (even FrankenPHP) IMO this means that the default entrypoint for "parsing and executing PHP files" for all SAPIs must not change, but /might/ either be complemented with a boolean arg for "pure PHP"/"no tags" , or the engine must provide another public entrypoint for this that SAPIs could implement or not. An environment variable could be even used for that, and be included in the engine by default, so that all existing SAPIs could be updated at lower cost, but the variable name would have to be checked in all existing Composer packages (something like "PHP_INPUT_PURE=0|1" , or similar, TDB anyway), and would only be used for *first included file*. Any subsequent call to "include/require" would still behave as before, to avoid BC breaks. And after that, to make use of this feature in userland projects, I would suggest an "include_pure" (and its "require" + "_once" variants) global keyword, to keep full compatibility everywhere. WDYT? --------------k5egc329tgrRqg1NET8Y467c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Le 28/05/2026 à 06:32, Ben Ramsey a écrit :
On 5/27/26 23:02, Hendrik Mennen wrote:

I am trying to understand whether your objection is to extension-
based dispatch specifically, or to the broader idea of the engine
making this decision at all.


I don't have a strong objection to the engine making this decision, but
I'd like to hear from others first.

Cheers,
Ben 


I think this can be summarised with this:

  • File extension cannot have a "meaning" for the engine, as the engine does not care about it at all in the first place
  • All SAPIs will consider a "normal PHP file" as default input, could it be CLI, mod_php for Apache, or anything else (even FrankenPHP)

IMO this means that the default entrypoint for "parsing and executing PHP files" for all SAPIs must not change, but might either be complemented with a boolean arg for "pure PHP"/"no <?php ?> tags" , or the engine must provide another public entrypoint for this that SAPIs could implement or not.

An environment variable could be even used for that, and be included in the engine by default, so that all existing SAPIs could be updated at lower cost, but the variable name would have to be checked in all existing Composer packages (something like "PHP_INPUT_PURE=0|1" , or similar, TDB anyway), and would only be used for first included file. Any subsequent call to "include/require" would still behave as before, to avoid BC breaks.

And after that, to make use of this feature in userland projects, I would suggest an "include_pure" (and its "require" + "_once" variants) global keyword, to keep full compatibility everywhere.

WDYT?

--------------k5egc329tgrRqg1NET8Y467c--