VPRINTF(3) 1 VPRINTF(3)
vprintf - Output a formatted string
SYNOPSIS
int vprintf (string $format, array $args)
DESCRIPTION
Display array values as a formatted string according to $format (which is described in the documentation for sprintf(3)).
Operates as printf(3) but accepts an array of arguments, rather than a variable number of arguments.
PARAMETERS
o $format
- See sprintf(3) for a description of $format.
o $args
-
RETURN VALUES
Returns the length of the outputted string.
EXAMPLES
Example #1
vprintf(3): zero-padded integers
<?php
vprintf("%04d-%02d-%02d", explode('-', '1988-8-1')); // 1988-08-01
?>
SEE ALSO
printf(3), sprintf(3), vsprintf(3).
PHP Documentation Group VPRINTF(3)