|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
29 - 12 = ?
Subscribe to this entry?

 [2009-07-01 20:25 UTC] scottq at iserve dot net dot nz
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:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-01 20:30 UTC]
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: Sat Jun 22 13:01:29 2024 UTC