php.net |  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
Votes:12
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kieran at menor dot dk
New email:
PHP Version: OS:

 

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


#!/usr/bin/php

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.


Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-05 12:53 UTC] cataphract@php.net
This would be nice; relaxing the "-r" switch by not requiring an argument would be a good option
 [2010-12-01 15:24 UTC] jani@php.net
-Package: PHP options/info functions +Package: CGI related
 [2018-03-21 22:47 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2018-03-21 22:47 UTC] cmb@php.net
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] <https://wiki.php.net/rfc/nophptags>
[2] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 07 21:01:27 2024 UTC