xref: /php-src/ext/odbc/tests/bug80152.phpt (revision b5a14e6c)
1--TEST--
2Bug #80152 (odbc_execute() moves internal pointer of $params)
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9include 'config.inc';
10
11$conn = odbc_connect($dsn, $user, $pass);
12odbc_exec($conn,"CREATE TABLE bug80152 (id INT, name CHAR(24))");
13$stmt = odbc_prepare($conn,"INSERT INTO bug80152 (id, name) VALUES (?, ?)");
14$params = [1, "John", "Lim"];
15var_dump(key($params));
16odbc_execute($stmt, $params);
17var_dump(key($params));
18?>
19--CLEAN--
20<?php
21include 'config.inc';
22
23$conn = odbc_connect($dsn, $user, $pass);
24odbc_exec($conn, "DROP TABLE bug80152");
25?>
26--EXPECT--
27int(0)
28int(0)
29