% |
字面意思的百分号字符。不需要参数。
|
b |
参数视为整数并以二进制数字呈现。
|
c |
参数视为整数并以 ASCII 字符呈现。
|
d |
参数视为整数并以(有符号)十进制数字呈现。
|
e |
参数当做科学符号处理(例如 1.2e+2)。
|
E |
与 e 标志符相同,但使用大写字母(例如 1.2E+2)。
|
f |
参数当做浮点数处理且作为浮点数呈现(locale aware)。
|
F |
参数当做浮点数处理且作为浮点数呈现(non-locale aware)。
|
g |
通用格式。
Let P equal the precision if nonzero, 6 if the precision is omitted,
or 1 if the precision is zero.
Then, if a conversion with style E would have an exponent of X:
If P > X ≥ −4, the conversion is with style f and precision P − (X + 1).
Otherwise, the conversion is with style e and precision P − 1.
|
G |
Like the g specifier but uses
E and f .
|
h |
Like the g specifier but uses F .
Available as of PHP 8.0.0.
|
H |
Like the g specifier but uses
E and F . Available as of PHP 8.0.0.
|
o |
参数视为整数并以八进制数字来呈现。
|
s |
参数视为字符串来呈现。
|
u |
参数视为整数并以无符号十进制数字呈现。
|
x |
参数视为整数并作为十六进制数字呈现(带小写字母)。
|
X |
参数视为整数并作为十六进制数字呈现(带大写字母)。
|