From the manual:
If you compare a number with a string or the comparison involves numerical strings, then each string is converted to a number and the comparison performed numerically.
So: ($i == $s)
is the same as ($i == (int)$s)
for the values you've given.
Use ===
to avoid type-juggling.