xref: /PHP-7.1/ext/sqlite3/tests/bug76665.phpt (revision ed7e3bc7)
1--TEST--
2Bug #76665 (SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle)
3--SKIPIF--
4<?php
5if (!extension_loaded('sqlite3')) die('skip sqlite3 extension not available');
6?>
7--FILE--
8<?php
9$db = new SQLite3(':memory:');
10$db->exec("CREATE TABLE foo (bar REAL)");
11$stmt = $db->prepare("INSERT INTO foo VALUES (:bar)");
12$stmt->bindValue(':bar', 17, SQLITE3_FLOAT);
13$stmt->execute();
14var_dump($db->querySingle("SELECT bar FROM foo LIMIT 1"));
15?>
16===DONE===
17--EXPECT--
18float(17)
19===DONE===
20