From: jeff at opendbms dot com
Operating system: Linux
PHP version: 5.0.0RC1
PHP Bug Type: Zend Engine 2 problem
Bug description: @foreach with references broken
Description:
------------
When I run this code:
foreach (@$formErrors as &$formError) {
I get this:
parse error, unexpected '&', expecting T_STRING or T_VARIABLE or '$'
Something about using both the @ and the & in the same foreach loop. It
works with either one alone, just not both.
Reproduce code:
---------------
use the foreach on a non-existant array with references, and the @
statement modifier.
Expected result:
----------------
Should skip the foreach loop.
Actual result:
--------------
Doesn't work.
--
Edit bug report at http://bugs.php.net/?id=27964&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27964&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27964&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27964&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27964&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27964&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27964&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27964&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27964&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27964&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27964&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27964&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27964&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27964&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27964&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27964&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27964&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27964&r=float