by codedokode · 10y ago · 0 comments
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.