Req #54588 [Dup]: Included files should not output shebang
| From: | yohgaki@php.net | Date: | Tue, 01 Oct 2013 10:36:46 +0000 |
| Subject: | Req #54588 [Dup]: Included files should not output shebang | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181872@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54588&edit=1
ID: 54588
Updated by: yohgaki@php.net
Reported by: djones109 at gmail dot com
Summary: Included files should not output shebang
Status: Duplicate
Type: Feature/Change Request
Package: Output Control
Operating System: All
PHP Version: 5.3SVN-2011-04-21 (snap)
Block user comment: N
Private report: N
New Comment:
I think this request should not be implemented.
Previous Comments:
------------------------------------------------------------------------
[2013-09-30 12:13:11] mike@php.net
See req #31563
------------------------------------------------------------------------
[2011-04-21 21:50:21] djones109 at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=54588&edit=1