Today I found out that our code appears to be backward incompatible with a change in PDO. In PHP <5.6 the result sets from a
It is not PHP7 but the underlying driver called mysqlnd.
Also, it is not a set of conversion rules but the way the transport protocol works: when both mysqlnd and native prepatred statements are used, then the binary transport protocol is used, means there is always an information about the data type. So the data just gets unpacked from the binary format right into a variable of the proper type - when PHP has an appropriate one, namely INTs and FLOATs (note that for the DECIMAL type string is returned, due to nature of this type).
In case you don't want this behavior, there is a configuration option for this
will revert this behavior to just strings and nulls as before