On 4 July 2025 15:49:59 BST, fennic log <fennic...@gmail.com> wrote: >This is basically an idea I have for PHP to support a main entry point. >Where regardless of execution, if you run a PHP file, in CLI or Web >request. >If the file that is executed contains a main function, that is >automatically executed by the engine after any procedural code.
Can you explain what problem or use case this is trying to solve? As others have pointed out, if you're running procedural code and then calling "main" with no arguments, it's equivalent to adding one line of code in the file, even including the return code: exit( main() ); Is there a specific scenario where you see an automatic call being a significant improvement over that line? Rowan Tommins [IMSoP]