Bug #67183 [Opn->Nab]: Caret (power of) in for results in infinite loop

From: Date: Fri, 02 May 2014 20:23:23 +0000
Subject: Bug #67183 [Opn->Nab]: Caret (power of) in for results in infinite loop
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185588@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67183&edit=1 ID: 67183 Updated by: requinix@php.net Reported by: ianbytchek at gmail dot com Summary: Caret (power of) in for results in infinite loop -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: OSX PHP Version: 5.5.12 Block user comment: N Private report: N New Comment: Yup, that's precedence. http://www.php.net/manual/en/language.operators.precedence.php Previous Comments: ------------------------------------------------------------------------ [2014-05-02 20:17:58] ianbytchek at gmail dot com Description: ------------ This doesn't work. for ($i = 0; $i < 2 ^ 10; $i++) { echo $i; } This does. for ($i = 0; $i < (2 ^ 10); $i++) { echo $i; } Is it actually a bug or is that how op precedence is expected to work here? Test script: --------------- for ($i = 0; $i < 2 ^ 10; $i++) { echo $i; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67183&edit=1

« previous php.bugs (#185588) next »