--TEST-- PDO Common: Bug #65946 (pdo_sql_parser.c permanently converts values bound to strings) --SKIPIF-- --FILE-- setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $db->exec('CREATE TABLE test(id int)'); $db->exec('INSERT INTO test VALUES(1)'); $stmt = $db->prepare('SELECT * FROM test LIMIT :limit'); $stmt->bindValue('limit', 1, PDO::PARAM_INT); if(!($res = $stmt->execute())) var_dump($stmt->errorInfo()); if(!($res = $stmt->execute())) var_dump($stmt->errorInfo()); var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); ?> --EXPECTF-- array(1) { [0]=> array(1) { ["id"]=> string(1) "1" } }