PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I suspect it has to do with the imprecision of real numbers.
Testing real numbers for equality is fraught with problems,
since 0.95 may actually be seen in memory as 0.94999999999 or so.
(Oversimplified, but comparing one real number to another for equality just doesn't work reliably.)
ok, thanks for your prompt replies. I'd been preoccupied by the thought that I was falling foul of some kind of type-promotion effect that a php-n00b such as myself wouldn't know about..