php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6775 Allow <?=$value?> as shortcut under XML with short_tags off
Submitted: 2000-09-16 07:27 UTC Modified: 2002-01-28 20:15 UTC
From: andy dot war at ntlworld dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.1pl2 OS: Linux 2.2.17
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: andy dot war at ntlworld dot com
New email:
PHP Version: OS:

 

 [2000-09-16 07:27 UTC] andy dot war at ntlworld dot com
Using <?=$value?> as a shortcut to <?php echo $value ?> fails 
when using XHTML or XML, as the short_open_tag option has to 
be turned off.

Is it possible to allow this one exception in this situation, as it is 
such a great shortcut.

I can't find anything in the XML specs that would prevent "<?=" 
being allowed as a tag as an alternative to "<?php echo". A valid 
XML tag must begin with a letter, underscore or colon AFAIK (with 
the only exception you cannot start the tag with XML).

--
'./configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' 
'--enable-track-vars' '--enable-versioning'

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-28 20:15 UTC] yohgaki@php.net
This will not be changed.

BTW, you may want to use echo "<?xml .....?>" .
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 08 01:01:28 2024 UTC