php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48760 <?= no longer prints output
Submitted: 2009-07-01 20:25 UTC Modified: 2009-07-01 20:36 UTC
From: scottq at iserve dot net dot nz Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.3.0 OS: CentOS 5.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scottq at iserve dot net dot nz
New email:
PHP Version: OS:

 

 [2009-07-01 20:25 UTC] scottq at iserve dot net dot nz
Description:
------------
In php versions up to 5.3.0RC4 <?= 'output'; ?> would print the word output to the screen. As of 5.3 this no longer works, instead outputs chunks of code to the screen.



Reproduce code:
---------------
class action {
  private $request = array('foo' => 'bar');

  public function getRequest($key, $default) {
    return isset($request[$key]) ? $request[$key] : $default;
  }
}

... some other stuff...

$array = ('key' => array('bar' => array('value' => 'foo')));

<?= 'output'; ?>
<?= $array['key'][$action->getRequest('foo', NULL)]['value']; ?>

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

Actual result:
--------------
action-&gt;getRequest('foo', NULL)]['value1']; ?&gt;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-01 20:30 UTC] rasmus@php.net
Unable to reproduce.  You probably don't have short_open_tag turned on in your config anymore.
 [2009-07-01 20:36 UTC] scottq at iserve dot net dot nz
Sorry, <?= 'output'; ?> doesn't get picked up by php at all.

The "action-&gt;getRequest('foo', NULL)]['value1']; ?&gt;" was coming from by browser.  It simply outputs "<?= 'output'; ?>".
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat May 28 04:06:34 2022 UTC