Req #54936 [Opn->Bgs]: alternative syntax for <?php ?>
| From: | johannes@php.net | Date: | Thu, 26 May 2011 17:51:00 +0000 |
| Subject: | Req #54936 [Opn->Bgs]: alternative syntax for <?php ?> | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160984@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54936&edit=1
ID: 54936
Updated by: johannes@php.net
Reported by: giorgio dot liscio at email dot it
Summary: alternative syntax for <?php ?>
-Status: Open
+Status: Bogus
Type: Feature/Change Request
Package: Unknown/Other Function
Operating System: any
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Most editors are aware of the PHP syntax.
Your propsed syntax won't work out as there is an conflict with
statements like $a[$b[23]].
You can parse PHP anyways using an XML parset. In your example you'd at
least have to write $item>getUrl();.
You can write the code in a more "compatible" way. (echo '<a
href="'.$item ....)
Previous Comments:
------------------------------------------------------------------------
[2011-05-26 18:55:45] giorgio dot liscio at email dot it
Description:
------------
hi, i don't know if there are some problems (parsing, security) with
this, but an alternative syntax for php open and close tags would be
really nice for xml
editors and xml parsers don't like php used like this:
<a href="<?php echo $item->getUrl(); ?>">Homepage</a>
so an alternative syntax, xml compatible, can be useful, for example:
<a href="[php[ echo $item->getUrl(); ]]">Homepage</a>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54936&edit=1