So for everyone whos not familiar with PHP syntax, PHP uses . symbol for concatenate two values, and + for adding one value to another. So for example 1 . 2 will return 12, and 1 + 2 will return 3, no matter the type of incoming values. I had experience with many languages for last few years, and my question is anyone knows why did only PHP choosed this kind of system? And other popular weak-typed languages like Python and Javascript didn't?
source https://stackoverflow.com/questions/77073481/why-does-only-php-uses-different-operators-for-concatenation-and-addition
No comments:
Post a Comment