/PHP-5.6/ext/standard/tests/general_functions/ |
H A D | 001.phpt | 2 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.6/ext/standard/tests/strings/ |
H A D | sprintf_f.phpt | 2 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 D | sprintf_error.phpt | 2 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 D | sprintf_f_2.phpt | 2 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 D | sprintf_basic3.phpt | 2 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 D | sprintf_basic9.phpt | 28 // 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 D | sprintf_basic2.phpt | 2 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 D | sprintf_basic4.phpt | 2 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 D | sprintf_basic5.phpt | 2 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 D | sprintf_basic6.phpt | 2 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 D | sprintf_basic7.phpt | 2 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 D | sprintf_basic7_64bit.phpt | 2 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 D | sprintf_basic8.phpt | 2 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 D | sprintf_basic8_64bit.phpt | 2 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 D | sprintf_basic1.phpt | 2 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 D | bug36392.phpt | 2 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 D | sprintf_f_3.phpt | 2 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 D | sprintf_variation52.phpt | 2 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 D | bug28633.phpt | 2 Bug #28633 (sprintf incorrectly adding padding to floats) 5 echo sprintf("%05.2f", 0.02) . "\n"; 6 echo sprintf("%05.2f", 2.02) . "\n";
|
/PHP-5.6/ext/standard/html_tables/ |
H A D | html_table_gen.php | 125 echo sprintf($t, date("Y")); 219 sprintf("%02X", $i << 6)." = { {\n"; 348 echo "\t{ ", sprintf("0x%04X", $k), ", ", sprintf("0x%02X", $v[0]), " },\t/* ", 474 sprintf("%05s", $k), "[] = {", "\n"; 478 echo "\t{ {", sprintf("%02d", count($v) - 1), 482 echo "\t{ {", sprintf("%02d", count($v)), 487 echo "\t{ {", sprintf("0x%05s", $l), ",\t", sprintf("\"%-21s", $w.'",'), "\t", 614 sprintf("%02X000", $i), "[] = {\n"; 762 echo sprintf(' {"%s", %d, 0x%05X, 0x%05X},', 765 echo sprintf(' {"%s", %d, 0x%05X, 0},', [all …]
|
/PHP-5.6/ext/intl/tests/ |
H A D | resourcebundle_individual.phpt | 14 $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.6/ext/pdo_mysql/tests/ |
H A D | pdo_mysql_attr_multi_statements.phpt | 20 $table = sprintf("test_%s", md5(mt_rand(0, PHP_INT_MAX))); 22 $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table)); 23 $create = sprintf('CREATE TABLE %s(id INT)', $table); 25 $db->exec(sprintf('INSERT INTO %s(id) VALUES (1)', $table)); 26 $stmt = $db->query(sprintf('SELECT * FROM %s; INSERT INTO %s(id) VALUES (2)', $table, $table)); 30 $stmt = $db->query(sprintf('SELECT id FROM %s', $table)); 38 $stmt = $db->query(sprintf('SELECT * FROM %s; INSERT INTO %s(id) VALUES (3)', $table, $table)); 43 $stmt = $db->query(sprintf('SELECT id FROM %s', $table)); 49 $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table));
|
H A D | pdo_mysql_attr_init_command.phpt | 20 $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.6/ext/mysqli/tests/ |
H A D | mysqli_pam_sha256_public_key_option.phpt | 24 die(sprintf("skip [%d] %s\n", $link->errno, $link->error)); 38 die(sprintf("skip [%d] %s\n", $link->errno, $link->error)); 42 die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error)); 52 die(sprintf("skip Cannot create RSA pub key file '%s'", $file)); 55 die(sprintf("skip Failed to create pub key file")); 60 die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error)); 69 die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error)); 74 die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error)); 80 die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error)); 83 if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) || [all …]
|
/PHP-5.6/ext/mysql/tests/ |
H A D | skipifconnectfailure.inc | 5 $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()));
|