Be careful when trying to validate using PDO::PARAM_INT.
Take this sample into account:
<?php
$id = '1a';
$stm = $pdo->prepare('select * from author where id = :id');
$bind = $stm->bindValue(':id', $id, PDO::PARAM_INT);
$stm->execute();
$authors = $stm->fetchAll();
var_dump($id); var_dump($bind); var_dump((int)$id); var_dump(is_int($id)); var_dump($authors); var_dump(1 == '1'); var_dump(1 === '1'); var_dump(1 === '1a'); var_dump(1 == '1a'); ?>
My opinion: bindValue() should test is_int() internaly first of anything,
It is a bug? I'm not sure.