MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3v4l98/php_7_released/cxkzv23/?context=3
r/programming • u/fnkrx • Dec 02 '15
729 comments sorted by
View all comments
Show parent comments
9
Aren't those all the same?
28 u/NeuroXc Dec 02 '15 Mostly."34" != "34 " and " 34" != "34 ".But "34" == " 34".Wat. 3 u/alexanderpas Dec 02 '15 integer comparison vs. string comparison.http://php.net/manual/en/language.types.string.php#language.types.string.conversion 2 u/greyfade Dec 02 '15 This is one of PHP's more annoying issues. When comparing two values that are strings, they should not be converted to ints just because they can be. → More replies (2)
28
Mostly.
"34" != "34 " and " 34" != "34 ".
"34" != "34 "
" 34" != "34 "
But "34" == " 34".
"34" == " 34"
Wat.
3 u/alexanderpas Dec 02 '15 integer comparison vs. string comparison.http://php.net/manual/en/language.types.string.php#language.types.string.conversion 2 u/greyfade Dec 02 '15 This is one of PHP's more annoying issues. When comparing two values that are strings, they should not be converted to ints just because they can be. → More replies (2)
3
integer comparison vs. string comparison.
http://php.net/manual/en/language.types.string.php#language.types.string.conversion
2 u/greyfade Dec 02 '15 This is one of PHP's more annoying issues. When comparing two values that are strings, they should not be converted to ints just because they can be. → More replies (2)
2
This is one of PHP's more annoying issues. When comparing two values that are strings, they should not be converted to ints just because they can be.
→ More replies (2)
9
u/oridb Dec 02 '15
Aren't those all the same?