I'm not Matt, but I'll try to answer :)

Actually the new re2c scanner already handles the shebang thing, so I
think you can safely remove the explicit support for it in CGI. We had
to had that because CLI doesn't explicitly support the shebang line.

Nuno

P.S.: now it makes sense why we never found the code in the flex
scanner that handled the shebang line :P


On Sun, Jul 27, 2008 at 11:56, Dmitry Stogov <[EMAIL PROTECTED]> wrote:
> Hi Matt,
>
> At first as you are a scanner expert, I would like you to look into another
> optimization idea.
>
> Probably for historical reason PHP supports shebang lines
> (#! /usr/bin/php) on top of php files. Especially to handle them PHP
> (CGI/FastCGI/CLI) opens file and check for it. So even with opcode caches
> FastCGI PHP does open syscall for the requested script, however with opcode
> caches it's absolutely useless.
>
> In case PHP scanner will handle shebang lines itself, we will able to save
> this syscall.
>
> I never had time and enough flex/re2c knowledge to implement this idea
> myself. May be you'll able to look into the problem. In case you find a
> simple solution we will able to do it in php-5.3.
>
> Most PHP hosters and large sites use FastCGI with opcode caches (it is also
> the primary way for MS Windows users), so this optimization is really
> important.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to