printf

PHP 4, PHP 5, PHP 7, PHP 8
printf - Output a formatted string
Printf Online Tool
Manual
Code Examples

Example #1 printf: various examples

Result: %b = '10100111101010011010101101' %c = 'A' %d = '43951789' %e = '4.39518e+7' %u = '43951789' %u = '4251015507' %f = '43951789.000000' %o = '247523255' %s = '43951789' %x = '29ea6ad' %X = '29EA6AD' %+d = '+43951789' %+d = '-43951789'
PHP Version:

Example #2 printf: string specifiers

Result: [monkey] [ monkey] [monkey ] [0000monkey] [####monkey] [ many monk] [many monk ]
PHP Version:


Example #3 of printf

PHP Version:


Function printf:

Strings Functions

Most used PHP functions