xref: /PHP-7.1/ext/pgsql/tests/bug46408.phpt (revision 072bc589)
1--TEST--
2Bug #46408 (Locale number format settings can cause pg_query_params to break with numerics)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6if (false === setlocale(LC_ALL, 'hr_HR.utf-8', 'hr_HR')) {
7    echo "skip Locale hr_HR.utf-8 not present";
8}
9?>
10--FILE--
11<?php
12
13require_once('config.inc');
14
15$dbh = pg_connect($conn_str);
16setlocale(LC_ALL, 'hr_HR.utf-8', 'hr_HR');
17echo 3.5 , "\n";
18pg_query_params("SELECT $1::numeric", array(3.5));
19pg_close($dbh);
20
21echo "Done".PHP_EOL;
22
23?>
24--EXPECTF--
253,5
26Done
27