Girgias / php-rfc-bool-string-deprecation

PHP RFC to deprecate boolean to string coercion
1 stars 1 forks source link

strict_types is also affected #1

Closed iluuu1994 closed 1 year ago

iluuu1994 commented 3 years ago

E.g. https://3v4l.org/oaRkv

String concatenation with bool is currently fine, even with strict_types. There are other cases too.

Girgias commented 3 years ago

Strict types does not affect concatenation, it only affects argument/return and types properties coercions.

iluuu1994 commented 3 years ago

Indeed, but that sentence makes it sound like this RFC will have no effect when strict_types are enabled, which is not correct. Maybe it's just a miscommunication.

Girgias commented 3 years ago

Well, I can drop it, but IIRC I didn't have this on the float to int, and people were asking for it's behaviour, but it could use maybe some better phrasing.