Hi

On 2026-09-22 23:12, Levi Morrison wrote:
this thread concerns my PR carrying the same title as this email:
https://github.com/php/php-src/pull/23658, where Gina requested that I
ask the mailing list for opinions and/or objections against the feature.

Why is this PR scoped to the CLI SAPI? Shouldn't it apply equally to
any SAPI's top-level script?

The “file is both a library and executable” use case is only really a thing for a single-file deployment, because otherwise you could just separate the executable bit into a different file. I believe that making a library do something useful when executed directly is something that would work for the CLI SAPI. In web contexts, where the front-controller pattern is already well-established and where you generally have an allow-list of legal entrypoints (mostly just your front-controller) for security reasons I don't see it working well.

Best regards
Tim Düsterhus

Reply via email to