Re: Power function as operator

From: Date: Fri, 22 Nov 2013 21:06:44 +0000
Subject: Re: Power function as operator
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-70295@lists.php.net to get a copy of this message
On Fri, Nov 22, 2013 at 12:56 PM, Sherif Ramadan <theanomaly.is@gmail.com>wrote: > On Fri, Nov 22, 2013 at 1:03 PM, Tjerk Meesters <tjerk.meesters@gmail.com > >wrote: > > > > > 2 ** 3 ** 2 == 512 > > > > > That looks very wrong. pow(pow(2,3),2) == 64 > > Exponent precedence should always be one higher than multiplication > precedence. > I don't know if we consider Google to be the authority but they also do 512: 2 ^ 3 ^ 2 = 512 https://www.google.com/search?q=2+%5E+3+%5E+2

« previous php.internals (#70295) next »