1--TEST-- 2Bug #46408 (Locale number format settings can cause pg_query_params to break with numerics) 3--EXTENSIONS-- 4pgsql 5--SKIPIF-- 6<?php 7require_once('inc/skipif.inc'); 8if (false === setlocale(LC_ALL, "de", "de_DE", "de_DE.ISO8859-1", "de_DE.ISO_8859-1", "de_DE.UTF-8")) { 9 echo "skip Locale de-DE not present"; 10} 11?> 12--FILE-- 13<?php 14 15require_once('inc/config.inc'); 16 17$dbh = pg_connect($conn_str); 18setlocale(LC_ALL, "de", "de_DE", "de_DE.ISO8859-1", "de_DE.ISO_8859-1", "de_DE.UTF-8"); 19echo 3.5 , "\n"; 20pg_query_params($dbh, "SELECT $1::numeric", array(3.5)); 21pg_close($dbh); 22 23echo "Done".PHP_EOL; 24 25?> 26--EXPECT-- 273.5 28Done 29