ID: 24754 Updated by: [EMAIL PROTECTED] Reported By: web at developer dot bg -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows2000 Adv Server PHP Version: 4.3.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Read the manual about operator precedence again. Previous Comments: ------------------------------------------------------------------------ [2003-07-22 12:20:08] web at developer dot bg Description: ------------ Under certain circumstances a variable storing the result of each() contains the boolean TRUE instead of the array or FALSE that is normaly expected. The code will give you an idea what exactly is the problem. Reproduce code: --------------- $arr = array('apple', 'banana', 'strawberry', 'pineapple', 'orange'); $i = 0; while($fruit=each($arr) || $i>=3) { echo $fruit[value].'<br>'; $i++; } Expected result: ---------------- apple banana strawberry Actual result: -------------- 1 1 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24754&edit=1
