Doc #78144 [Fbk]: Is <?= shorthand tag removed in 7.0.0 or not?
| From: | girgias@php.net | Date: | Tue, 11 Jun 2019 14:23:03 +0000 |
| Subject: | Doc #78144 [Fbk]: Is <?= shorthand tag removed in 7.0.0 or not? | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16731@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78144&edit=1
ID: 78144
Updated by: girgias@php.net
Reported by: johannes dot kingma at gmail dot com
-Summary: Removed in 7.0.0 or not?
+Summary: Is <?= shorthand tag removed in 7.0.0 or not?
Status: Feedback
Type: Documentation Problem
Package: PHP Language Specification
-Operating System: <?= shorthand tag
+Operating System:
-PHP Version: 7.3.6
+PHP Version: 7.0.0
Block user comment: N
Private report: N
New Comment:
The changelog entry is on the ASP tags [1] which have been removed.
The short echo tag <?= is always available as of PHP 5.4 as can be seen on the note above [1]
It seems you are not making a distinction between both INI directives
[1] https://www.php.net/manual/en/ini.core.php#ini.asp-tags
Previous Comments:
------------------------------------------------------------------------
[2019-06-11 13:44:25] peehaa@php.net
What is the confusion? It is saying the same thing everywhere.
------------------------------------------------------------------------
[2019-06-11 13:37:57] johannes dot kingma at gmail dot com
A link? How do you mean?
In the php.ini-production von php7.3 I see:
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
------------------------------------------------------------------------
[2019-06-11 13:18:22] peehaa@php.net
Do you have a link for that? I only see:
> The ASP tags <%, %>, <%=, and the script tag <script language="php">
> are removed from PHP.
@ https://www.php.net/manual/en/language.basic-syntax.phptags.php
------------------------------------------------------------------------
[2019-06-11 13:10:01] johannes dot kingma at gmail dot com
Description:
------------
---
From manual page: https://php.net/language.basic-syntax.phptags
---
In https://www.php.net/manual/en/ini.core.php#ini.short-open-tag
one can read that from 5.4 <?= will always be available and that asp_tags will be removed.
Basic syntax in Changelog claims that <?= were removed from 7.0.0
What is true?
Test script:
---------------
Text should read:
7.0.0 The ASP tags <%, %> and the script tag <script language="php"> are
removed from PHP. The shorthand tag <?= will be available.
Expected result:
----------------
In the php_ini-production:
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78144&edit=1