Confusion about result '-1299'

Can some one explain why result ‘-1299’ is shown after executing following statment.

$var = 1 + "-1.3e3";


Thanks in advance

What did you expect it to show? The explanation is 1 - 1300 = -1299

Already answered, but out of curiosity, what are you wanting to occur instead?

Thanks for reply. My confuion is how “1.3e3” is actually 1300.

Does expanding it out to 1.3 * 10^3 help?
A bit of a study of might help too.

Scientific notation, it actually reads as 1.3 x 10 ^ 3. PHP recognizes this as a number when casting from a string.

Really thanks for your help.