Edit report at https://bugs.php.net/bug.php?id=54588&edit=1

 ID:                 54588
 Updated by:         m...@php.net
 Reported by:        djones109 at gmail dot com
 Summary:            Included files should not output shebang
-Status:             Open
+Status:             Duplicate
-Type:               Bug
+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:

See req #31563


Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to