Bug #73104 [NEW]: next causes fatal error on constant array

From: Date: Sun, 18 Sep 2016 08:03:29 +0000
Subject: Bug #73104 [NEW]: next causes fatal error on constant array
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204107@lists.php.net to get a copy of this message
From: jerry at jmweb dot net Operating system: Windows 7 Pro 64bit PHP version: 5.6.26 Package: Arrays related Bug Type: Bug Bug description:next causes fatal error on constant array Description: ------------ When creating an array constant, the next() function generates a fatal error. The key() and current() functions work as expected. Test script: --------------- const ARRAY_BUG = [ 1, 2 ]; var_dump( key( ARRAY_BUG ), current( ARRAY_BUG ), next( ARRAY_BUG ) ); Expected result: ---------------- int(0) int(1) int(2) Actual result: -------------- Fatal error: Only variables can be passed by reference in ... -- Edit bug report at https://bugs.php.net/bug.php?id=73104&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73104&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73104&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73104&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73104&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73104&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73104&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73104&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73104&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73104&r=support Expected behavior: https://bugs.php.net/fix.php?id=73104&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73104&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73104&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73104&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73104&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73104&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73104&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73104&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73104&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73104&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73104&r=mysqlcfg

« previous php.bugs (#204107) next »