#48760 [NEW]: <?= no longer prints output when outputting an array
[email protected] ("scottq at iserve dot net dot nz")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: scottq at iserve dot net dot nz
Operating system: CentOS 5.3
PHP version: 5.3.0
PHP Bug Type: Output Control
Bug description: <?= no longer prints output when outputting an array
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 bug report at http://bugs.php.net/?id=48760&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48760&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48760&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48760&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48760&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48760&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48760&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48760&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48760&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48760&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48760&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48760&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48760&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48760&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48760&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48760&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48760&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48760&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48760&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48760&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48760&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48760&r=mysqlcfg