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
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: 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 Sep 19 15:01:27 2024 UTC