Earlier quoted context omitted.
> And if we look at Javascript, it is even worse than Ruby. How do you call Javascript if PHP is "garbage"? I think JS is better than PHP, at least when it comes to: 1.) consistency of std lib and 2.) type casting. There are many surprises with PHP's type casting. See /r/lolphp sorted from top all-time: https://www.reddit.com/r/lolphp/top/?sort=top&t=all
Try console.log([] * {}) and be surprised. At least in PHP you cannot multiply array by object. Type casting in PHP gets fixed gradually: https://wiki.php.net/rfc/invalid_strings_in_arithmetic .
[] + {}
and {} + []
The first one is "[object Object]" and the second one is 0.