php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76222 add use empty tag <?= ?>
Submitted: 2018-04-14 22:33 UTC Modified: 2018-04-16 20:47 UTC
From: koreshs at mail dot ru Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 7.2.4 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-04-14 22:33 UTC] koreshs at mail dot ru
Description:
------------
Please add the use of empty tags <?= ?>.
At design time, you often need to comment on values and variables. Use the tag <?= $val ?> possible. But use the tag <?= //$var ?> cause an error. But the tag itself <?= ?> a fundamental principle of language for the creation of the website, as the script needs to output the values and variables. Please finish the tag and bring it to mind.

Test script:
---------------
<?= //$val ?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-14 23:11 UTC] cmb@php.net
-Status: Open +Status: Feedback -Package: PHP Language Specification +Package: Scripting Engine problem -Assigned To: +Assigned To: cmb
 [2018-04-14 23:11 UTC] cmb@php.net
Isn't something like <https://3v4l.org/09AB3> even more nice,
since it actually prints a dummy text?
 [2018-04-16 20:26 UTC] koreshs at mail dot ru
-Status: Feedback +Status: Assigned
 [2018-04-16 20:26 UTC] koreshs at mail dot ru
You do not understand!. 
Required work without error NOT <?= 'Example' //Example ?>. 
Requires error - free operation for <?= // ?> and <?= //Example ?> and <?= ?>.
Script itself <?= ?> should not cause errors.
 [2018-04-16 20:34 UTC] requinix@php.net
-Status: Assigned +Status: Wont fix -Assigned To: cmb +Assigned To:
 [2018-04-16 20:34 UTC] requinix@php.net
<?= "" //$val ?>

If you want to push for this change to the language then use the RFC process. https://wiki.php.net/rfc/howto
 [2018-04-16 20:43 UTC] spam2 at rhsoft dot net
> You do not understand!

you don#t

> Script itself <?= ?> should not cause errors

it should simply because it's the short form for <?php echo; ?>

php > echo ;
Parse error: syntax error, unexpected ';' in php shell code on line 1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC