格式
PHP 列印格式
類型 | 說明 | description |
---|---|---|
%% | 百分比 | Returns a percent sign |
%b | 二進位 | Binary number |
%c | ASCII | The character according to the ASCII value |
%d | 有正負的十進制整數 | Signed decimal number (negative, zero or positive) |
%e | 大寫指數 | Scientific notation using a lowercase (e.g. 1.2e+2) |
%E | 小寫指數 | Scientific notation using a uppercase (e.g. 1.2E+2) |
%u | 十進制正整數 | Unsigned decimal number (equal to or greather than zero) |
%f | 浮點數 | Floating-point number (local settings aware) |
%F | 浮點數 | Floating-point number (not local settings aware) |
%g | %e and %f 簡寫 | shorter of %e and %f |
%G | %E and %f 簡寫 | shorter of %E and %f |
%o | 八進制 | Octal number |
%s | 字串 | String |
%x | 十六進制(小寫) | Hexadecimal number (lowercase letters) |
%X | 十六進制(大寫) | Hexadecimal number (uppercase letters) |