From the documentation it is not clear what exactly pg_query_params does when non string parameters are given.
I suppose that: In case a parameter is a string it should just escape it and enclose it in ticks, In case the parameter is a number (e.g. integer or float), it should convert it to a string and should not enclose it in ticks. If it is a null value it should replace it with the string NULL without enclosing it in ticks, if it is a boolean it should replace it with true or false accordingly without ticks or with T and F depending on taste, in case it is an array with compatible elements it should convert to a respective expression (e.g. array[‘hi’,’sir’] or array[3.45,45.7]) and so on for other more exotic types (multidimensional arrays, associative arrays when the extension is activated etc).
The other interpretation would be that it only works correctly with strings.
So where is explained what exactly pg_query_params does when called from PHP ?
I suppose a similar behaviour will happen for the mysqli or PDO corresponding calls so a full answer may clarify it for a wider audience.