1--TEST-- 2Bug #63916 PDO::PARAM_INT casts to 32bit int internally even on 64bit builds in pdo_sqlite 3--EXTENSIONS-- 4pdo_sqlite 5--SKIPIF-- 6<?php 7if (PHP_INT_SIZE > 4) die('skip 32-bit only'); 8?> 9--FILE-- 10<?php 11$num = PHP_INT_MAX; // 32 bits 12$conn = new PDO('sqlite::memory:'); 13$conn->query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT NULL, PRIMARY KEY(id))'); 14 15$stmt = $conn->prepare('insert into users (id, num) values (:id, :num)'); 16$stmt->bindValue(':id', 1, PDO::PARAM_INT); 17$stmt->bindValue(':num', $num, PDO::PARAM_INT); 18$stmt->execute(); 19 20$stmt = $conn->query('SELECT num FROM users'); 21$result = $stmt->fetchAll(PDO::FETCH_COLUMN); 22 23var_dump($num,$result[0]); 24 25?> 26--EXPECT-- 27int(2147483647) 28int(2147483647) 29