Re: Power function as operator

From: Date: Sat, 23 Nov 2013 10:49:57 +0000
Subject: Re: Power function as operator
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-70324@lists.php.net to get a copy of this message
Tjerk Meesters wrote:
That's not to say it's entirely intuitive; while I was researching the operator precedence rules I saw at least a couple of threads with confused developers, to which the reply has always been "if it doesn't work the way you want, you're not using enough parentheses":)
The various thoughts either way would suggest that for PHP6 there should be a general BC to make the parentheses compulsary. I learnt early on that the safe way of working was always to add them because of inconsistency between languages, so making them compulsary when there are multiple operations makes sense. While not directly relevent, when processing numbers within an SQL query the parentheses helps align type conversions so use of them can be 'normal' anyway. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

« previous php.internals (#70324) next »