Will comparison of string "10″ and integer 11 work in PHP?
Answer Posted / Pawan Kumar Deepak
No, comparing a string with an integer will not work as expected. In this case, the string '10″' would be considered greater than the integer 11 because strings are compared lexicographically (letter by letter), and '10″' comes after '11' in alphabetical order.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers