On 14 Jul 2014, at 18:14, Alain Williams <a...@phcomp.co.uk> wrote: > I trust that you meant 1.5 not 0.666.
Er… yes. I somehow misread 3/2 as 2/3. > I would have expected 1 - since it appears, from the code, that $a should > only contain integers. So? PHP doesn’t do integer division. It does what Python 3 does: if two integers cannot divide cleanly, then a float division is done instead. This may not be what C, C++, C#, Java, or some other strictly-typed languages do, but it is what PHP does, and has done for a long time. It’s also what makes the most sense, IMO. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php