Does PDO::PARAM_INT perform any function at all when used with $db->quote() function? e.g. $db->quote($user['id'], PDO::PARAM_INT)?
It seems like it is, because even string input will get passed trough. Not to mention that it keeps the quotes around the integer. Is there any reason why should I use it?
It has no effect, since, after all, you are running the
quotefunction. It’s only natural that it gets wrapped in quotes.PDO::PARAM_INTis likely more important in other contexts, like prepared statements, where it is actually handled differently than strings.quotelikely is more concerned with other data types that should not be quoted or should be quoted differently, likePDO::PARAM_BOOL