Lines Matching refs:sprintf

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));
34 var_dump(sprintf($format, $num, $location));
42 var_dump(sprintf("%%b = '%b'", $n)); // binary representation
43 var_dump(sprintf("%%c = '%c'", $c)); // print the ascii character, same as chr() function
44 var_dump(sprintf("%%d = '%d'", $n)); // standard integer representation
45 var_dump(sprintf("%%e = '%e'", $n)); // scientific notation
46 var_dump(sprintf("%%u = '%u'", $n)); // unsigned integer representation of a positive integer
47 var_dump(sprintf("%%u = '%u'", $u)); // unsigned integer representation of a negative integer
48 var_dump(sprintf("%%f = '%f'", $n)); // floating point representation
49 var_dump(sprintf("%%o = '%o'", $n)); // octal representation
50 var_dump(sprintf("%%s = '%s'", $n)); // string representation
51 var_dump(sprintf("%%x = '%x'", $n)); // hexadecimal representation (lower-case)
52 var_dump(sprintf("%%X = '%X'", $n)); // hexadecimal representation (upper-case)
54 var_dump(sprintf("%%+d = '%+d'", $n)); // sign specifier on a positive integer
55 var_dump(sprintf("%%+d = '%+d'", $u)); // sign specifier on a negative integer
62 var_dump(sprintf("[%s]", $s)); // standard string output
63 var_dump(sprintf("[%10s]", $s)); // right-justification with spaces
64 var_dump(sprintf("[%-10s]", $s)); // left-justification with spaces
65 var_dump(sprintf("[%010s]", $s)); // zero-padding works on strings too
66 var_dump(sprintf("[%'#10s]", $s)); // use the custom padding character '#'
67 var_dump(sprintf("[%10.10s]", $t)); // left-justification but with a cutoff of 10 characters
70 var_dump(sprintf("%04d-%02d-%02d", 2006, 12, 18));
76 var_dump(sprintf("%01.2f", $money)); // output "123.10"
81 var_dump(sprintf("%.3e", $number)); // outputs 3.63e+8