The following code:
echo (int) "2e2";
echo (int) 2e2;
echo (float) "2e2";
outputs
2
200
200
.. and i have no idea why. Thanks.
The following code:
echo (int) "2e2";
echo (int) 2e2;
echo (float) "2e2";
outputs
2
200
200
.. and i have no idea why. Thanks.
"2e2" is scientific notation, meaning 2*102 == 200.
e
).2e2
as a float literal with value 200.0 and this gives 200 when cast to a int.