|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52980 Allow omitting start tag for CLI scripts
Submitted: 2010-10-03 17:13 UTC Modified: 2018-03-21 22:47 UTC
Avg. Score:3.2 ± 1.0
Reproduced:9 of 10 (90.0%)
Same Version:2 (22.2%)
Same OS:2 (22.2%)
From: kieran at menor dot dk Assigned:
Status: Suspended Package: CGI/CLI related
PHP Version: Irrelevant OS: *nix
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
49 + 2 = ?
Subscribe to this entry?

 [2010-10-03 17:13 UTC] kieran at menor dot dk
I would like to be able to make my PHP scripts executable so I can do something like this:


echo 'Hello world';

Either have a CLI switch that disables the need for a start tag, or automatically detect shebang in the beginning of a file.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-05 12:53 UTC]
This would be nice; relaxing the "-r" switch by not requiring an argument would be a good option
 [2010-12-01 15:24 UTC]
-Package: PHP options/info functions +Package: CGI related
 [2018-03-21 22:47 UTC]
-Status: Open +Status: Suspended
 [2018-03-21 22:47 UTC]
There is an RFC regarding this topic[1].  Feel free to either
revive this RFC or start an alternative RFC[2].  I'm suspending
this ticket for the time being.

[1] <>
[2] <>
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 02 00:01:27 2023 UTC