Executing the following instruction in PHP 7.3 will return false.
',commaSeparatedString' >= '0' // => Result is false (evaluate strings)
If You compare against an integer 0, or do not put the comma at the beginning you get the expected results.
',commaSeparatedString' >= 0 // => Result is true (cast to integer)
'commaSeparatedString' >= '0' // => Result is true (evaluate strings)
Can someone explain what is PHP Doing in the under the hood to get to that result? I was expecting a different result. Thanks!
PD: If someone else come up with a better title for the question, feel free to edit it :)