/PHP-8.2/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-8.2/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_basic3.phpt | 2 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 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_basic9.phpt | 23 // 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 D | sprintf_basic2.phpt | 2 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 D | sprintf_basic4.phpt | 2 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 D | sprintf_basic5.phpt | 2 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 D | sprintf_basic6.phpt | 2 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 D | sprintf_basic1.phpt | 2 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 D | sprintf_basic7.phpt | 2 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 D | sprintf_basic7_64bit.phpt | 2 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 D | sprintf_basic8.phpt | 2 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 D | sprintf_basic8_64bit.phpt | 2 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 D | sprintf_error.phpt | 2 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 D | sprintf_variation5.phpt | 2 sprintf With signed integer 12 var_dump(sprintf("%%b = '%b'", $n)); // binary representation 14 var_dump(sprintf("%%d = '%d'", $n)); // standard integer representation 15 var_dump(sprintf("%%e = '%e'", $n)); // scientific notation 16 var_dump(sprintf("%%f = '%f'", $n)); // floating point representation 17 var_dump(sprintf("%%o = '%o'", $n)); // octal representation 18 var_dump(sprintf("%%s = '%s'", $n)); // string representation 19 var_dump(sprintf("%%x = '%x'", $n)); // hexadecimal representation (lower-case) 20 var_dump(sprintf("%%X = '%X'", $n)); // hexadecimal representation (upper-case) 22 var_dump(sprintf("%%+d = '%+d'", $n)); // sign specifier on a positive integer [all …]
|
H A D | sprintf_variation1.phpt | 2 Test sprintf() function : usage variations - unexpected values for format argument 74 var_dump(sprintf($value)); 81 var_dump(sprintf($value, $arg1)); 88 var_dump(sprintf($value, $arg1, $arg2)); 150 sprintf(): Argument #1 ($format) must be of type string, array given 151 sprintf(): Argument #1 ($format) must be of type string, array given 152 sprintf(): Argument #1 ($format) must be of type string, array given 155 sprintf(): Argument #1 ($format) must be of type string, array given 156 sprintf(): Argument #1 ($format) must be of type string, array given 157 sprintf(): Argument #1 ($format) must be of type string, array given [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 11 var_dump(sprintf("%.3f", 100.426)); 12 var_dump(sprintf("%.2f", 100.426)); 13 var_dump(sprintf("%f'", 100.426)); 18 var_dump(sprintf("%01.2f", $money)); 19 var_dump(sprintf("%.3e", $money));
|
H A D | sprintf_variation52.phpt | 2 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 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-8.2/ext/standard/html_tables/ |
H A D | html_table_gen.php | 214 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.2/ext/pdo_mysql/tests/ |
H A D | pdo_mysql_attr_init_command.phpt | 21 $table = sprintf("test_%s", md5(mt_rand(0, PHP_INT_MAX))); 23 $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table)); 25 $create = sprintf('CREATE TABLE %s(id INT)', $table); 33 $db->exec(sprintf('INSERT INTO %s(id) VALUES (1)', $table)); 34 $stmt = $db->query(sprintf('SELECT id FROM %s', $table)); 37 $db->exec(sprintf('DROP TABLE IF EXISTS %s', $table));
|
/PHP-8.2/ext/mysqli/tests/ |
H A D | mysqli_pam_sha256_public_key_option.phpt | 22 die(sprintf("skip [%d] %s\n", $link->errno, $link->error)); 36 die(sprintf("skip [%d] %s\n", $link->errno, $link->error)); 40 die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error)); 48 $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd")… 50 die(sprintf("skip Cannot create RSA pub key file '%s'", $file)); 53 die(sprintf("skip Failed to create pub key file")); 65 die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error)); 70 die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error)); 76 die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error)); 79 if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) || [all …]
|
/PHP-8.2/Zend/tests/ |
H A D | first_class_callable_001.phpt | 5 $sprintf = sprintf(...); 7 echo $sprintf("Hello %s", "World");
|