summaryrefslogtreecommitdiff
path: root/ext/sqlite3/tests/bug71049.phpt
blob: 5c2843f34598b70aecd3bf16f78a2f26c4a85f51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #71049 (SQLite3Stmt::execute() releases bound parameter instead of internal buffer)
--SKIPIF--
<?php
if (!extension_loaded('sqlite3')) die('skip'); ?>
--FILE--
<?php

require(__DIR__ . '/new_db.inc');

$db->exec('CREATE TABLE test (age INTEGER, id STRING)');

$stmt = $db->prepare("SELECT * FROM test WHERE id = ? ORDER BY id ASC");
$foo = "alive" . chr(33);
$stmt->bindParam(1, $foo, SQLITE3_BLOB);
$results = $stmt->execute();
var_dump($foo);
$db->close();
?>
--EXPECT--
string(6) "alive!"