Doc #66097 [Csd]: short tags should no longer be discouraged
| From: | salathe@php.net | Date: | Mon, 18 Nov 2013 09:15:43 +0000 |
| Subject: | Doc #66097 [Csd]: short tags should no longer be discouraged | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10614@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66097&edit=1
ID: 66097
Updated by: salathe@php.net
Reported by: postmaster at greg0ire dot fr
Summary: short tags should no longer be discouraged
Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: krakjoe
Block user comment: N
Private report: N
New Comment:
Just to be clear, the use of the "short_open_tag" INI option continues to be discouraged
for the same reasons as always.
As of PHP 5.4.0, the shorthand echo tag (for want of a better name) "<?=" is always
enabled and is considered "okay" to use.
In short, the documentation sections that were quoted in the bug report are correct; our
discouragement of the use of the "short_open_tag" option and tag continues.
Previous Comments:
------------------------------------------------------------------------
[2013-11-17 08:57:35] krakjoe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
------------------------------------------------------------------------
[2013-11-17 08:57:28] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=332148
Log: fix #66097 update information on short tags
------------------------------------------------------------------------
[2013-11-14 17:34:42] postmaster at greg0ire dot fr
Description:
------------
From this page : http://php.net/manual/en/language.basic-syntax.phptags.php
> PHP also allows for short tags <? and ?> (which are discouraged because they are only
> available if enabled with short_open_tag php.ini configuration file directive, or if PHP was
> configured with the --enable-short-tags option.
From this page : http://www.php.net/manual/en/ini.core.php#ini.short-open-tag
> This directive also affected the shorthand <?= before PHP 5.4.0, which is identical to <?
> echo. Use of this shortcut required short_open_tag to be on. Since PHP 5.4.0, <?= is always
> available.
This probably means short tags should no longer be discouraged (the first page should be modified)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66097&edit=1