I\'m comparing strings with comparison operators.
I needs some short of explanations for the below two comparisons and their result.
if(\'ai\' >
When both Strings are in Number format, PHP will convert the strings to numbers and convert the values.
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. These rules also apply to the switch statement. The type conversion does not take place when the comparison is === or !== as this involves comparing the type as well as the value.
Reference https://www.php.net/manual/en/language.operators.comparison.php
Edit: formatting.