xref: /PHP-7.2/ext/sqlite3/tests/bug72571.phpt (revision a19655cf)
1--TEST--
2Bug #72571 (SQLite3::bindValue, SQLite3::bindParam crash)
3--SKIPIF--
4<?php
5if (!extension_loaded('sqlite3')) die('skip'); ?>
6--FILE--
7<?php
8$db = new SQLite3(':memory:');
9
10$stmt = $db->prepare("select 1 = ?");
11
12// bindParam crash
13$i = 0;
14$stmt->bindParam(0, $i);
15
16var_dump($stmt->execute());
17$db->close();
18?>
19--EXPECTF--
20object(SQLite3Result)#%d (0) {
21}
22