1--TEST-- 2PDO Common: PECL Bug #5809 (PDOStatement::execute(array()) changes param) 3--SKIPIF-- 4<?php 5if (!extension_loaded('pdo')) die('skip'); 6$dir = getenv('REDIR_TEST_DIR'); 7if (false == $dir) die('skip no driver'); 8require_once $dir . 'pdo_test.inc'; 9PDOTest::skip(); 10?> 11--FILE-- 12<?php 13if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); 14require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; 15$db = PDOTest::factory(); 16 17$db->exec("CREATE TABLE test (id int NOT NULL, PRIMARY KEY (id))"); 18$db->exec("INSERT INTO test (id) VALUES (1)"); 19 20$values = array(1); 21var_dump($values); 22$stmt = $db->prepare('SELECT * FROM test WHERE id = ?'); 23$stmt->execute($values); 24var_dump($values); 25?> 26--EXPECT-- 27array(1) { 28 [0]=> 29 int(1) 30} 31array(1) { 32 [0]=> 33 int(1) 34} 35