php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69460 Don't output shebang line
Submitted: 2015-04-15 09:31 UTC Modified: 2015-04-15 11:39 UTC
From: michaelduff2 at yahoo dot com Assigned: cmb (profile)
Status: Duplicate Package: *General Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: michaelduff2 at yahoo dot com
New email:
PHP Version: OS:

 

 [2015-04-15 09:31 UTC] michaelduff2 at yahoo dot com
Description:
------------
When a PHP script is executed via the command-line, the "shebang" (which looks like this:)

#!/usr/bin/php

Is not printed to the console.

However, when executing a PHP script via a web server such as mod_php, etc., the line IS output to the browser, though I am sure this is very, very rarely (if ever) desirable behaviour.

Removing this inconsistency would allow a single PHP script to operate in both "web page" and command-line modes depending on how it is executed.

This feature request has previously been declared "Related To" Bugs #54588 and #64488, and then a "Duplicate" of #31563, which was then set to "won't fix" with a reason of "Windows XP reached end of support on April 8th, 2014"

I believe that misses the point (as operating system is not inherently a factor) and, infact potentially makes this issue even /more/ important for cross-platform compatibility reasons.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-15 11:38 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-04-15 11:38 UTC] cmb@php.net
This issue has indeed been reported several times. Maybe the best
analysis so far is contained in #60677, so I'm marking this ticket
as duplicate. Actually, I think the behavior is a bug.
 [2015-04-15 11:39 UTC] cmb@php.net
Related to bug #60677.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 06:01:26 2019 UTC