Edit report at https://bugs.php.net/bug.php?id=62705&edit=1

 ID:                 62705
 Updated by:         ahar...@php.net
 Reported by:        bogdan at yurov dot me
 Summary:            Add syntax for short output
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   any
 PHP Version:        5.4.5
 Block user comment: N
 Private report:     N

 New Comment:

I don't think we need more variations on the open tag syntax -- if anything, we 
need less, not more. This would be impossible to Google for, and another 
variation that would trip up learning developers, who already tend to have a 
rough enough time with short open tags.

Marking won't fix, subject to the caveat that this could still be pursued as an 
RFC (which would be more appropriate anyway, as a language level change).


Previous Comments:
------------------------------------------------------------------------
[2012-07-31 17:49:38] bogdan at yurov dot me

Description:
------------
Hello!
It would be great if we could use ternar operator with short syntax. For 
example:

<?? $var == 123 : 'ok' ?>

... instead of:

<?= $var == 123 ? 'ok' : '' ?>

In php 5.4 short syntax is enabled by default. what if you add this feature (of 
cause, not with exactly same syntax).

Looking forward to you response.

Test script:
---------------
<?= $var == 123 ? 'ok' : '' ?>

Expected result:
----------------
<?? $var == 123 : 'ok' ?>



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62705&edit=1

Reply via email to