That is to say, if you assign a string value to variable var , var becomes a string. If any of the operands is a double, then all operands are evaluated as doubles, and the result will be a double. Otherwise, the operands will be interpreted as integers, and the result will also be an integer. If you wish to force a variable to be evaluated as a certain type, see the section on Type casting . For this reason, as of PHP 3.0.12 and PHP 4.0b3-RC4, the result of this automatic conversion is considered to be undefined.
Fixes are, however, being discussed.
It may not be obvious exactly what will happen when casting between certain types. All rights reserved.