>>> I'm wondered why the shebang line support was removed from scanner. >> >> Because it didn't make any sense for other SAPIs. You could ask Ilia more >> about it: >> >> ------------------------------------------------------------------------- >> r273178 | iliaa | 2009-01-09 19:21:12 +0200 (Fri, 09 Jan 2009) | 4 lines >> >> MFH: Corrected fix for bug #46844 to only trigger on the 1st line of CLI >> opened files. >> ------------------------------------------------------------------------ > > I think it's better to be consistent between different SAPI. I would > prefer all of them always skip shebang line instead of checking it only in > CGI and CLI. Anyway it doesn't cost the performance degradation we got.
+1 >>> Note that going back to this solution requires extra open() and fstat() >>> syscalls in case the requested file already stored in opcode cache. It >>> might be a visible slowdown for FastCGI sapi. >> >> Any ideas how to avoid it without adding this thing into the scanner? > > SAPI knows nothing about opcode caches, so it's not possible to do in > general way. I believe as soon as php is parsed and its shebang is skipped, it does not matter how the results (opcodes) are cached -- the output will be the same because shebang has not been converted into echo. In other words, no extra open() or fstat() are needed at all. -j -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php