considering BIT as a Tiny int value
This is motivated by:
BIT values in MySQL are closer to integers. Although they’re stored as binary data, they represent numeric bit-fields and are used in bitwise operations, which aligns them more with integers than with strings. (https://github.com/amphp/mysql/issues/137#issuecomment-2755789840)
A BIT field is a binary data type. Simply casting to an integer is insufficient. unpack() will be necessary to convert the value to an integer.
The other binary field types are returned as strings. While I can see the logic in returning a BIT field as an integer, this would be a BC break to anyone who is doing the conversion to an integer themselves.
@trowski I'd say converting to int is the right thing to do, given that this is what php-src also does. But yes, it's unfortunate that it's a BC break.
Hey thank you for your attention! I understand your concerns and I'm glad this is somewhat relevant to you. Let me know if any further steps shall be taken, I'm glad to help.