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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC