Type Specifiers for printf() and sprintf() : sprintf : Development PHP Source Code

PHP Source Code » Development » sprintf »


Type Specifiers for printf() and sprintf()

Specifier           Input type                   Output Format

b                   Integer                      Binary number

C                   Integer                      Single character

D                   Integer                      Signed decimal number

U                   Integer                      Unsigned decimal number

F                   Floating-point number        Floating-point number

O                   Integer                      Octal number

S                   String                       String

X                   Integer                      Hexadecimal number with lowercase letters

X                   Integer                      Hexadecimal number with uppercase letters

HTML code for linking to this page:

    PHP Function Reference -> Users Code Examples / Notes - > sprintf:
  • sprintf
  • vsprintf
Follow Navioo On Twitter

PHP Source Code

 Navioo Development
» sprintf