downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

vprintf> <ucwords
[edit] Last updated: Sat, 07 Jan 2012

view this page in

vfprintf

(PHP 5)

vfprintfWrite a formatted string to a stream

설명

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.

예제

Example #1 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() - Parses input from a file according to a format
  • vsprintf() - Return a formatted string
  • number_format() - Format a number with grouped thousands



add a note add a note User Contributed Notes vfprintf
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites