From: Operating system: All PHP version: 5.3SVN-2011-04-21 (snap) Package: Output Control Bug Type: Bug Bug description:Included files should not output shebang
Description: ------------ When writing CLI scripts, one typically adds a shebang to the beginning of the script. When the script is executed, the shebang is not outputted. On occasion, it's useful to include another CLI script. When the file is included, the shebang on the included file is outputted, contrary to expected behavior. Test script: --------------- file1.php: #!/usr/bin/php <?php echo "Including file2\n"; include 'file2.php'; ?> file2.php: #!/usr/bin/php <?php echo "Inside file2\n"; ?> Expected result: ---------------- Including file2 Inside file2 Actual result: -------------- Including file2 #!/usr/bin/php Inside file2 -- Edit bug report at http://bugs.php.net/bug.php?id=54588&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54588&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54588&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54588&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54588&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54588&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54588&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54588&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54588&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54588&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54588&r=support Expected behavior: http://bugs.php.net/fix.php?id=54588&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54588&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54588&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54588&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54588&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54588&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54588&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54588&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54588&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54588&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54588&r=mysqlcfg