#48760 [Opn->Bgs]: <?= no longer prints output when outputting an array
| From: | rasmus@php.net | Date: | Wed, 01 Jul 2009 20:30:32 +0000 |
| Subject: | #48760 [Opn->Bgs]: <?= no longer prints output when outputting an array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139085@lists.php.net to get a copy of this message | ||
ID: 48760
Updated by: rasmus@php.net
Reported By: scottq at iserve dot net dot nz
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: CentOS 5.3
PHP Version: 5.3.0
New Comment:
Unable to reproduce. You probably don't have short_open_tag turned on
in your config anymore.
Previous Comments:
------------------------------------------------------------------------
[2009-07-01 20:25:28] 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->getRequest('foo', NULL)]['value1']; ?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48760&edit=1