Option 1: Introduce require_path
I think require_code is a better name. Parm 1 isn't a path, it is a
file, so require_path seems wrong to me.
I'd prefer a 'start in code mode' optional second parameter to
include[_once] and require[_once].
Option 2: Filename Convention
The PHP engine should not know or care what the file extension is. I
won't object if you can convince autoloader authors to follow the .phpc
convention. Personally, once I can count on this feature, every file I
include/require will probably be written starting in code mode and using
the new calling convention. Even when I use PHP to create page templates...
Additional suggestions:
Add an option so the CLI can start in code mode too.
Add another Handler to the Apache SAPI, maybe
application/x-httpd-php-code similar to x-httpd-php and
x-httpd-php-source, so we can configure Apache to start arbitrary file
extensions with code mode on. This defers setting the action for
various file extensions to the person configuring the web server.
Other web server SAPIs will need similar treatment, but I'll leave them
to someone with personal experience.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php