php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60271 The <?=$foo?> in the example is no longer supported by PHP
Submitted: 2011-11-11 16:52 UTC Modified: 2011-11-11 18:17 UTC
From: darkmantis at cybershade dot org Assigned:
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: N/A
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: darkmantis at cybershade dot org
New email:
PHP Version: OS:

 

 [2011-11-11 16:52 UTC] darkmantis at cybershade dot org
Description:
------------
---
From manual page: http://www.php.net/function.echo#refsect1-function.echo-description
---
"echo() also has a shortcut syntax, where you can immediately follow the opening tag with an equals sign. This short syntax only works with the short_open_tag configuration setting enabled.
I have <?=$foo?> foo."

The <?=$foo?> foo is no longer supported in PHP >= 5.


Expected result:
----------------
bar

Actual result:
--------------
bar

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-11 18:17 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-11-11 18:17 UTC] aharvey@php.net
The <?= shortcut syntax still works fine in PHP 5, provided you have the short_open_tag INI setting enabled, as the manual says. (Or you have PHP 5.4, which enables it globally.)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC