|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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->getRequest('foo', NULL)]['value1']; ?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 09:00:01 2025 UTC |
Sorry, <?= 'output'; ?> doesn't get picked up by php at all. The "action->getRequest('foo', NULL)]['value1']; ?>" was coming from by browser. It simply outputs "<?= 'output'; ?>".