PHP printf vs sprintf
printf will output a formatted string using placeholders.
sprintf will return the formatted string
Hello Jeff, How's it going?
It is also possible to format a number with these 2 functions. This can be used to format a decimal value used to represent money so that it always has 2 decimal digits.
The two functions vprintf and vsprintf operate as printf and sprintf, but accept a format string and an array of values, instead of individual variables.