Home
last modified time | relevance | path

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

12345678910>>...15

/PHP-5.3/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-5.3/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_error.phpt2 Test sprintf() function : error conditions
10 echo "*** Testing sprintf() : error conditions ***\n";
14 var_dump( sprintf() );
24 var_dump( sprintf($format1) );
25 var_dump( sprintf($format2,$arg1) );
26 var_dump( sprintf($format3,$arg1,$arg2) );
29 var_dump( sprintf($format2) );
30 var_dump( sprintf($format3,$arg1) );
33 var_dump( sprintf($format3) );
38 *** Testing sprintf() : error conditions ***
[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_basic3.phpt2 Test sprintf() function : basic functionality - float format
27 // Calling sprintf() with default arguments
28 var_dump( sprintf($format) );
30 // Calling sprintf() with two arguments
31 var_dump( sprintf($format1, $arg1) );
32 var_dump( sprintf($format11, $arg1) );
34 // Calling sprintf() with three arguments
35 var_dump( sprintf($format2, $arg1, $arg2) );
36 var_dump( sprintf($format22, $arg1, $arg2) );
38 // Calling sprintf() with four arguments
[all …]
H A Dsprintf_basic9.phpt28 // Calling sprintf() with default arguments
29 var_dump( sprintf($format) );
31 // Calling sprintf() with two arguments
32 var_dump( sprintf($format1, $arg1) );
33 var_dump( sprintf($format11, $arg1) );
35 // Calling sprintf() with three arguments
36 var_dump( sprintf($format2, $arg1, $arg2) );
37 var_dump( sprintf($format22, $arg1, $arg2) );
39 // Calling sprintf() with four arguments
40 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic2.phpt2 Test sprintf() function : basic functionality - integer format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
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_basic4.phpt2 Test sprintf() function : basic functionality - bool format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
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_basic5.phpt2 Test sprintf() function : basic functionality - char format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
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_basic6.phpt2 Test sprintf() function : basic functionality - exponential format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
21 // Calling sprintf() with default arguments
22 var_dump( sprintf($format) );
24 // Calling sprintf() with two arguments
25 var_dump( sprintf($format1, $arg1) );
27 // Calling sprintf() with three arguments
28 var_dump( sprintf($format2, $arg1, $arg2) );
30 // Calling sprintf() with four arguments
31 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic7.phpt2 Test sprintf() function : basic functionality - unsigned format
11 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
28 // Calling sprintf() with default arguments
29 var_dump( sprintf($format) );
31 // Calling sprintf() with two arguments
32 var_dump( sprintf($format1, $arg1) );
34 // Calling sprintf() with three arguments
35 var_dump( sprintf($format2, $arg1, $arg2) );
37 // Calling sprintf() with four arguments
38 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic7_64bit.phpt2 Test sprintf() function : basic functionality - unsigned format
7 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
24 // Calling sprintf() with default arguments
25 var_dump( sprintf($format) );
27 // Calling sprintf() with two arguments
28 var_dump( sprintf($format1, $arg1) );
30 // Calling sprintf() with three arguments
31 var_dump( sprintf($format2, $arg1, $arg2) );
33 // Calling sprintf() with four arguments
34 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic8.phpt2 Test sprintf() function : basic functionality - octal format
11 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
27 // Calling sprintf() with default arguments
28 var_dump( sprintf($format) );
30 // Calling sprintf() with two arguments
31 var_dump( sprintf($format1, $arg1) );
33 // Calling sprintf() with three arguments
34 var_dump( sprintf($format2, $arg1, $arg2) );
36 // Calling sprintf() with four arguments
37 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[all …]
H A Dsprintf_basic8_64bit.phpt2 Test sprintf() function : basic functionality - octal format
7 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
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_basic1.phpt2 Test sprintf() function : basic functionality - string format
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
21 // Calling sprintf() with default arguments
22 var_dump( sprintf($format) );
24 // Calling sprintf() with two arguments
25 var_dump( sprintf($format1, $arg1) );
27 // Calling sprintf() with three arguments
28 var_dump( sprintf($format2, $arg1, $arg2) );
30 // Calling sprintf() with four arguments
31 var_dump( sprintf($format3, $arg1, $arg2, $arg3) );
[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_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 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : with typical format strings ***\n";
17 var_dump(sprintf("%%%.2f", 1.23456789e10));
20 var_dump(sprintf("%%", 1.23456789e10));
23 var_dump(sprintf("%.988f", 1.23456789e10));
26 var_dump(sprintf("%030.-15s", $tempstring));
29 var_dump(sprintf("%X", 12));
32 var_dump(sprintf("%d %s %d\n", $tempnum, $tempstring, $tempnum));
35 var_dump(sprintf("%s", $tempstring, $tempstring, $tempstring));
[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);
H A Dsprintf_variation53.phpt2 Test sprintf() function : usage variations - with whitespaces in format strings
5 /* Prototype : string sprintf(string $format [, mixed $arg1 [, mixed ...]])
10 echo "*** Testing sprintf() : with white spaces in format strings ***\n";
30 var_dump( sprintf($format, 1234) );
36 *** Testing sprintf() : with white spaces in format strings ***
/PHP-5.3/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-5.3/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-5.3/ext/mysql/tests/
H A Dskipifconnectfailure.inc5 $myhost = sprintf("%s:%s", $host, $socket);
7 $myhost = sprintf("%s:%s", $host, $port);
10 die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysql_errno(), mysql_error()));
13 die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysql_errno(), mysql_error()));
H A Dmysql_pconn_max_links.phpt10 $host = sprintf("%s:%s", $host, $socket);
12 $host = sprintf("%s:%s", $host, $port);
16 die(sprintf("skip Cannot connect [%d] %s", mysql_errno(), mysql_error()));
19 die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
22 die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
26 die(sprintf("skip Can't check if old_passwords = ON"));
35 die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
70 $host = sprintf("%s:%s", $host, $socket);
72 $host = sprintf("%s:%s", $host, $port);
114 if (!mysql_query(sprintf('KILL %d', $pthread_id), $link))
[all …]

Completed in 33 milliseconds

12345678910>>...15