Home
last modified time | relevance | path

Searched refs:sprintf (Results 1 – 25 of 365) sorted by relevance

12345678910>>...15

/PHP-8.0/ext/standard/tests/strings/
H A Dsprintf_f.phpt2 sprintf %f
6 var_dump(sprintf("%3.2f", 1.2));
7 var_dump(sprintf("%-3.2f", 1.2));
8 var_dump(sprintf("%03.2f", 1.2));
9 var_dump(sprintf("%-03.2f", 1.2));
11 var_dump(sprintf("%5.2f", 3.4));
12 var_dump(sprintf("%-5.2f", 3.4));
13 var_dump(sprintf("%05.2f", 3.4));
14 var_dump(sprintf("%-05.2f", 3.4));
16 var_dump(sprintf("%7.2f", -5.6));
[all …]
H A Dsprintf_basic3.phpt2 Test sprintf() function : basic functionality - float format
22 // Calling sprintf() with default arguments
23 var_dump( sprintf($format) );
25 // Calling sprintf() with two arguments
26 var_dump( sprintf($format1, $arg1) );
27 var_dump( sprintf($format11, $arg1) );
29 // Calling sprintf() with three arguments
30 var_dump( sprintf($format2, $arg1, $arg2) );
31 var_dump( sprintf($format22, $arg1, $arg2) );
33 // Calling sprintf() with four arguments
[all …]
H A Dsprintf_f_2.phpt2 sprintf %f #2
7 var_dump(sprintf("%.3F", 100.426));
8 var_dump(sprintf("%.2F", 100.426));
9 var_dump(sprintf("%d", 100.426));
10 var_dump(sprintf("%d", 100.9));
11 var_dump(sprintf("%o", 100.426));
12 var_dump(sprintf("%o", 100.9));
21 var_dump(sprintf($format, $num, $location));
25 var_dump(sprintf($format, $num, $location));
29 var_dump(sprintf($format, $num, $location));
[all …]
H A Dsprintf_basic9.phpt23 // Calling sprintf() with default arguments
24 var_dump( sprintf($format) );
26 // Calling sprintf() with two arguments
27 var_dump( sprintf($format1, $arg1) );
28 var_dump( sprintf($format11, $arg1) );
30 // Calling sprintf() with three arguments
31 var_dump( sprintf($format2, $arg1, $arg2) );
32 var_dump( sprintf($format22, $arg1, $arg2) );
34 // Calling sprintf() with four arguments
35 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic2.phpt2 Test sprintf() function : basic functionality - integer format
5 echo "*** Testing sprintf() : basic functionality - using integer format ***\n";
17 // Calling sprintf() with default arguments
18 var_dump( sprintf($format) );
20 // Calling sprintf() with two arguments
21 var_dump( sprintf($format1, $arg1) );
23 // Calling sprintf() with three arguments
24 var_dump( sprintf($format2, $arg1, $arg2) );
26 // Calling sprintf() with four arguments
27 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic4.phpt2 Test sprintf() function : basic functionality - bool format
5 echo "*** Testing sprintf() : basic functionality - using bool format ***\n";
17 // Calling sprintf() with default arguments
18 var_dump( sprintf($format) );
20 // Calling sprintf() with two arguments
21 var_dump( sprintf($format1, $arg1) );
23 // Calling sprintf() with three arguments
24 var_dump( sprintf($format2, $arg1, $arg2) );
26 // Calling sprintf() with four arguments
27 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic5.phpt2 Test sprintf() function : basic functionality - char format
5 echo "*** Testing sprintf() : basic functionality - using char format ***\n";
17 // Calling sprintf() with default arguments
18 var_dump( sprintf($format) );
20 // Calling sprintf() with two arguments
21 var_dump( sprintf($format1, $arg1) );
23 // Calling sprintf() with three arguments
24 var_dump( sprintf($format2, $arg1, $arg2) );
26 // Calling sprintf() with four arguments
27 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic6.phpt2 Test sprintf() function : basic functionality - exponential format
5 echo "*** Testing sprintf() : basic functionality - using exponential format ***\n";
16 // Calling sprintf() with default arguments
17 var_dump( sprintf($format) );
19 // Calling sprintf() with two arguments
20 var_dump( sprintf($format1, $arg1) );
22 // Calling sprintf() with three arguments
23 var_dump( sprintf($format2, $arg1, $arg2) );
25 // Calling sprintf() with four arguments
26 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic1.phpt2 Test sprintf() function : basic functionality - string format
5 echo "*** Testing sprintf() : basic functionality - using string format ***\n";
16 // Calling sprintf() with default arguments
17 var_dump( sprintf($format) );
19 // Calling sprintf() with two arguments
20 var_dump( sprintf($format1, $arg1) );
22 // Calling sprintf() with three arguments
23 var_dump( sprintf($format2, $arg1, $arg2) );
25 // Calling sprintf() with four arguments
26 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic7.phpt2 Test sprintf() function : basic functionality - unsigned format
11 echo "*** Testing sprintf() : basic functionality - using unsigned format ***\n";
23 // Calling sprintf() with default arguments
24 var_dump( sprintf($format) );
26 // Calling sprintf() with two arguments
27 var_dump( sprintf($format1, $arg1) );
29 // Calling sprintf() with three arguments
30 var_dump( sprintf($format2, $arg1, $arg2) );
32 // Calling sprintf() with four arguments
33 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic7_64bit.phpt2 Test sprintf() function : basic functionality - unsigned format
7 echo "*** Testing sprintf() : basic functionality - using unsigned format ***\n";
19 // Calling sprintf() with default arguments
20 var_dump( sprintf($format) );
22 // Calling sprintf() with two arguments
23 var_dump( sprintf($format1, $arg1) );
25 // Calling sprintf() with three arguments
26 var_dump( sprintf($format2, $arg1, $arg2) );
28 // Calling sprintf() with four arguments
29 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic8.phpt2 Test sprintf() function : basic functionality - octal format
11 echo "*** Testing sprintf() : basic functionality - using octal format ***\n";
22 // Calling sprintf() with default arguments
23 var_dump( sprintf($format) );
25 // Calling sprintf() with two arguments
26 var_dump( sprintf($format1, $arg1) );
28 // Calling sprintf() with three arguments
29 var_dump( sprintf($format2, $arg1, $arg2) );
31 // Calling sprintf() with four arguments
32 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic8_64bit.phpt2 Test sprintf() function : basic functionality - octal format
7 echo "*** Testing sprintf() : basic functionality - using octal format ***\n";
18 // Calling sprintf() with default arguments
19 var_dump( sprintf($format) );
21 // Calling sprintf() with two arguments
22 var_dump( sprintf($format1, $arg1) );
24 // Calling sprintf() with three arguments
25 var_dump( sprintf($format2, $arg1, $arg2) );
27 // Calling sprintf() with four arguments
28 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_error.phpt2 Test sprintf() function : error conditions
10 var_dump( sprintf() );
24 var_dump( sprintf($format1) );
29 var_dump( sprintf($format2,$arg1) );
34 var_dump( sprintf($format3,$arg1,$arg2) );
41 var_dump( sprintf($format2) );
46 var_dump( sprintf($format3,$arg1) );
53 var_dump( sprintf($format3) );
59 var_dump(sprintf('%100$d %d'));
65 var_dump(sprintf("foo %", 42));
[all …]
H A Dbug36392.phpt2 Bug #36392 (wrong number of decimal digits with %e specifier in sprintf)
5 echo sprintf("%e\n", 1.123456789);
6 echo sprintf("%.10e\n", 1.123456789);
7 echo sprintf("%.0e\n", 1.123456789);
8 echo sprintf("%.1e\n", 1.123456789);
9 echo sprintf("%5.1e\n", 1.123456789);
H A Dsprintf_variation1.phpt2 Test sprintf() function : usage variations - unexpected values for format argument
88 var_dump(sprintf($value));
95 var_dump(sprintf($value, $arg1));
102 var_dump(sprintf($value, $arg1, $arg2));
164 sprintf(): Argument #1 ($format) must be of type string, array given
165 sprintf(): Argument #1 ($format) must be of type string, array given
166 sprintf(): Argument #1 ($format) must be of type string, array given
169 sprintf(): Argument #1 ($format) must be of type string, array given
170 sprintf(): Argument #1 ($format) must be of type string, array given
171 sprintf(): Argument #1 ($format) must be of type string, array given
[all …]
H A Dsprintf_f_3.phpt2 sprintf %f #3
8 var_dump(sprintf("%.3f", 100.426));
9 var_dump(sprintf("%.2f", 100.426));
10 var_dump(sprintf("%f'", 100.426));
15 var_dump(sprintf("%01.2f", $money));
16 var_dump(sprintf("%.3e", $money));
H A Dsprintf_variation52.phpt2 Test sprintf() function : usage variations - typical format strings
5 echo "*** Testing sprintf() : with typical format strings ***\n";
12 var_dump(sprintf("%%%.2f", 1.23456789e10));
15 var_dump(sprintf("%%", 1.23456789e10));
18 var_dump(sprintf("%.988f", 1.23456789e10));
22 var_dump(sprintf("%030.-15s", $tempstring));
28 var_dump(sprintf("%X", 12));
31 var_dump(sprintf("%d %s %d\n", $tempnum, $tempstring, $tempnum));
34 var_dump(sprintf("%s", $tempstring, $tempstring, $tempstring));
39 *** Testing sprintf() : with typical format strings ***
[all …]
H A Dbug28633.phpt2 Bug #28633 (sprintf incorrectly adding padding to floats)
5 echo sprintf("%05.2f", 0.02) . "\n";
6 echo sprintf("%05.2f", 2.02) . "\n";
H A Dbug23894.phpt2 Bug #23894 (sprintf() decimal specifiers problem)
6 $test = sprintf("%04d", $a);
8 $test = sprintf("% 13u", $a);
/PHP-8.0/ext/standard/tests/general_functions/
H A D001.phpt2 sprintf() function
6 $agent = sprintf("%.5s", "James Bond, 007");
8 echo("sprintf string truncate test: ");
15 echo("sprintf padding and align test: ");
32 $test = sprintf("%b", 3457925);
47 echo sprintf("%.2f\n", "99.00");
48 echo sprintf("%.2f\n", 99.00);
50 echo sprintf("%e\n", 1.234E-18);
51 echo sprintf("%e\n", 1.234E+18);
52 echo sprintf("%e\n", 9843243.12);
[all …]
/PHP-8.0/ext/standard/html_tables/
H A Dhtml_table_gen.php214 sprintf("%02X", $i << 6)." = { {\n";
343 echo "\t{ ", sprintf("0x%04X", $k), ", ", sprintf("0x%02X", $v[0]), " },\t/* ",
468 sprintf("%05s", $k), "[] = {", "\n";
473 "\t", sprintf("%02d", (count($v) - 1)), ",\t\t",
476 echo "\t{ {", sprintf("%-22s", 'NULL,'),
481 echo "\t{ {", sprintf("\"%-21s", $w.'",'), "\t", sprintf("0x%05s", $l), ",\t",
545 sprintf("%02X%03X", $i, $k << 6), "[] = {\n";
608 sprintf("%02X000", $i), "[] = {\n";
756 echo sprintf(' {"%s", %d, 0x%05X, 0x%05X},',
759 echo sprintf(' {"%s", %d, 0x%05X, 0},',
[all …]
/PHP-8.0/ext/pdo_mysql/tests/
H A Dpdo_mysql_attr_init_command.phpt20 $table = sprintf("test_%s", md5(mt_rand(0, PHP_INT_MAX)));
22 $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table));
24 $create = sprintf('CREATE TABLE %s(id INT)', $table);
31 $db->exec(sprintf('INSERT INTO %s(id) VALUES (1)', $table));
32 $stmt = $db->query(sprintf('SELECT id FROM %s', $table));
35 $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table));
/PHP-8.0/ext/intl/tests/
H A Dresourcebundle_individual.phpt14 $str_res .= sprintf( "length: %d\n", ut_resourcebundle_count($r) );
15 $str_res .= sprintf( "teststring: %s\n", ut_resourcebundle_get($r, 'teststring' ) );
16 $str_res .= sprintf( "testint: %d\n", ut_resourcebundle_get($r, 'testint' ) );
20 $str_res .= sprintf( "testbin: %s\n", bin2hex(ut_resourcebundle_get( $r,'testbin' )) );
23 $str_res .= sprintf( "testtable: %d\n", ut_resourcebundle_get($r2, 'major' ) );
26 $str_res .= sprintf( "testarray: %s\n", ut_resourcebundle_get($r2, 2 ) );
/PHP-8.0/ext/mysqli/tests/
H A Dmysqli_pam_sha256_public_key_option.phpt23 die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
37 die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
41 die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
51 die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
54 die(sprintf("skip Failed to create pub key file"));
59 die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
68 die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
73 die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
79 die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
82 if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
[all …]

Completed in 116 milliseconds

12345678910>>...15