mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
32 lines
530 B
PHP
32 lines
530 B
PHP
--TEST--
|
|
pg_insert() fails for references
|
|
--EXTENSIONS--
|
|
pgsql
|
|
--SKIPIF--
|
|
<?php
|
|
include("skipif.inc");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
include "config.inc";
|
|
|
|
function fee(&$a) {}
|
|
$a = ["bar" => "testing"];
|
|
fee($a["bar"]);
|
|
|
|
$db = pg_connect($conn_str);
|
|
pg_query($db, "DROP TABLE IF EXISTS gh8253");
|
|
pg_query($db, "CREATE TABLE gh8253 (bar text);");
|
|
pg_insert($db, "gh8253", $a);
|
|
$res = pg_query($db, "SELECT * FROM gh8253");
|
|
var_dump(pg_fetch_all($res));
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
[0]=>
|
|
array(1) {
|
|
["bar"]=>
|
|
string(7) "testing"
|
|
}
|
|
}
|