php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30044 Don't require php tags for shell scripts.
Submitted: 2004-09-10 00:46 UTC Modified: 2004-09-10 09:20 UTC
From: nconantj at frontiernet dot net Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nconantj at frontiernet dot net
New email:
PHP Version: OS:

 

 [2004-09-10 00:46 UTC] nconantj at frontiernet dot net
Description:
------------
I would deeply appreciate it if I could write a PHP shell script without the PHP required tags.

As far as implementing this, make it a command line option for the CLI (--notags).

PHP is a powerful language that could be more easily used for system shell scripts with this ability.  I would be able to write a script as follows:

#!/usr/bin/php --notags
<<code>>

rather than as:

#!/usr/bin/php
<?php
  <<code>>
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-10 00:55 UTC] rasmus@php.net
You should read the output of: php -h
 [2004-09-10 04:48 UTC] nconantj at frontiernet dot net
The only option there that is approaching relevent is -r, but that requires some form of quoting to prevent the shell from parsing it, and it requires that every line have a backslash (\) just prior to the new line.
 [2004-09-10 09:20 UTC] derick@php.net
This was brought up before a couple of times, and it was decided that we will not add this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC