Re: [PHP-DEV] include *.php
Martin Pedak wrote: What people think about adding regular expressions to include() or require() constructions or even making new language consruction like import() that can handle reg. exp. file includes. So thant you can include(/my/path/*) or import(/my/path/*.php). You seem to be thinking about something like the import mechanism in Java, aren't you? While this is a nice feature for a compiling language it does not make to much sense for a scripting environment where every included file will hurt runtinme performance and where this 'feature' could be used for attacks by putting additional files in import-directories. If you really still want this feature you can always use readdir() and friends to implement the requested behavior in userland -- Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de +49-711-99091-77 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] include *.php
On Fri, 13 Jul 2001, Hartmut Holzgraefe wrote: Martin Pedak wrote: What people think about adding regular expressions to include() or require() constructions or even making new language consruction like import() that can handle reg. exp. file includes. So thant you can include(/my/path/*) or import(/my/path/*.php). You seem to be thinking about something like the import mechanism in Java, aren't you? While this is a nice feature for a compiling language it does not make to much sense for a scripting environment where every included file will hurt runtinme performance and where this 'feature' could be used for attacks by putting additional files in import-directories. If you really still want this feature you can always use readdir() and friends to implement the requested behavior in userland This is more or less what we did in binarycloud. We've created the notion of packages and somewhat of a hierarchical namespace in userland. It works really well, although the usefulness would probably be lost on small applications or scriptlets. Other than possibly making import into a language construct as opposed to a function, and having the the engine do the package management, which is more convenience than anything else, we haven't found much reason to implement this in the language. www.binarycloud.com if you're interested. John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] include *.php
Hello. What people think about adding regular expressions to include() or require() constructions or even making new language consruction like import() that can handle reg. exp. file includes. So thant you can include(/my/path/*) or import(/my/path/*.php). From this feature the package management could obtain great benefit !? Or if somebody is so kind and wirtes special .so which contains described function import() with reg. exp. support ? Martin. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]