(PHP 5)
vfprintf — Записывает отформатированную строку в поток
Описание
int vfprintf ( resource $handle, string $format, array $args )Write a string produced according to format to the stream resource specified by handle.
Operates as fprintf() but accepts an array of arguments, rather than a variable number of arguments.
Список параметров
- handle
-
- format
-
See sprintf() for a description of format.
- args
-
Возвращаемые значения
Returns the length of the outputted string.
Примеры
vfprintf(): zero-padded integers
<?php
if (!($fp = fopen('date.txt', 'w')))
return;
vfprintf($fp, "%04d-%02d-%02d", array($year, $month, $day));
// will write the formatted ISO date to date.txt
?> Смотрите также
| printf() |
| sprintf() |
| sscanf() |
| fscanf() |
| vsprintf() |
| number_format() |