Req #60319 [Com]: PHP shorthand syntax
| From: | deepakbalanimail at gmail dot com | Date: | Sat, 19 Nov 2011 05:38:24 +0000 |
| Subject: | Req #60319 [Com]: PHP shorthand syntax | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165347@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60319&edit=1
ID: 60319
Comment by: deepakbalanimail at gmail dot com
Reported by: deepakbalanimail at gmail dot com
Summary: PHP shorthand syntax
Status: Open
Type: Feature/Change Request
Package: *General Issues
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
@anon
This is just an example, not the actual problem.
Previous Comments:
------------------------------------------------------------------------
[2011-11-18 15:39:57] anon at anon dot anon
Yuck. Why would you code like that? Keep it in a single tag. <?php echo true ? 'True' :
'False'; ?>
------------------------------------------------------------------------
[2011-11-17 13:27:16] deepakbalanimail at gmail dot com
Description:
------------
This is feature request:-
PHP needs a more efficient shorthand syntax. PHP already has the shorthand syntax for <?php echo
$expr ?> = <?= $expr ?>.
But this thing will become nightmare when we want to use some flow control.
<?php if(true): ?>
<?= 'True' ?>
<?php else: ?>
<?= 'False' ?>
<?php endif; ?>
In this example we have to mix both type of syntax. So we need to make <?= ?> capable to
process decision instructions.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60319&edit=1