I'm guessing this is KiX's auto intepreter stuff.
Assuming correctly $i is an Integer so the second test correctly displays 0. The first test should not pass at all.
I wish KiX would error out when comparing different types of variables. (PowerShell does)