php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66097 short tags should no longer be discouraged
Submitted: 2013-11-14 17:34 UTC Modified: 2013-11-18 09:15 UTC
From: postmaster at greg0ire dot fr Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: postmaster at greg0ire dot fr
New email:
PHP Version: OS:

 

 [2013-11-14 17:34 UTC] 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)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-17 08:57 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=332148
Log: fix #66097 update information on short tags
 [2013-11-17 08:57 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-11-17 08:57 UTC] 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-18 09:15 UTC] salathe@php.net
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.
 [2020-02-07 06:08 UTC] phpdocbot@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=7abfa104a665647bcf61a9ef1a964253999d5a38
Log: fix #66097 update information on short tags
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 15:00:02 2026 UTC