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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 13:00:02 2026 UTC