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

search for in the

vprintf> <ucwords
[edit] Last updated: Sun, 19 May 2013

view this page in

vfprintf

(PHP 5)

vfprintfScrive una stringa formatta in un flusso

Descrizione

int vfprintf ( resource $handle , string $format , array $args )

Scrive la stringa prodotta in base a format sul flusso indicato da handle. format รจ descritto nella documentazione di sprintf().

La funzione agisce come fprintf() ma accetta una matrice di argomenti, piuttosto che un numero variabile di argomenti.

Restituisce la lunghezza della stringa prodotta.

Vedere anche printf(), sprintf(), sscanf(), fscanf(), vsprintf() e number_format().

Esempio

Example #1 vfprintf(): interi completati con zero

<?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
?>



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

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