1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Files
archived-php-src/ext/standard/tests/strings/printf_h_H.phpt
T
2022-07-25 23:56:14 +01:00

21 lines
464 B
PHP

--TEST--
sprintf() %h and %H specifiers
--SKIPIF--
<?php
if (setlocale(LC_ALL, 'invalid') === 'invalid') { die('skip setlocale() is broken /w musl'); }
if (!setlocale(LC_ALL, "de_DE.utf8")) die("skip de_DE.utf8 locale not available");
?>
--FILE--
<?php
setlocale(LC_ALL, "de_DE.utf8");
$f = 1.25;
printf("%g %G %h %H\n", $f, $f, $f, $f);
$f = 0.00000125;
printf("%g %G %h %H\n", $f, $f, $f, $f);
?>
--EXPECT--
1,25 1,25 1.25 1.25
1,25e-6 1,25E-6 1.25e-6 1.25E-6