dave            Sat Aug  7 14:21:07 2004 EDT

  Added files:                 
    /phpdoc/en/reference/strings/functions      vfprintf.xml 
  Log:
  - Add vfprintf().
  
  

http://cvs.php.net/co.php/phpdoc/en/reference/strings/functions/vfprintf.xml?r=1.1&p=1
Index: phpdoc/en/reference/strings/functions/vfprintf.xml
+++ phpdoc/en/reference/strings/functions/vfprintf.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
  <refentry id="function.vfprintf">
   <refnamediv>
    <refname>vfprintf</refname>
    <refpurpose>Write a formatted string to a stream</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>vfprintf</methodname>
      <methodparam><type>resource</type><parameter>handle</parameter></methodparam>
      <methodparam><type>string</type><parameter>format</parameter></methodparam>
      <methodparam 
choice="opt"><type>array</type><parameter>args</parameter></methodparam>
     </methodsynopsis>
    <simpara>
     Write a string produced according to <parameter>format</parameter>
     to the stream resource specified by <parameter>handle</parameter>.
     <parameter>format</parameter> is described in the documentation for
     <function>sprintf</function>.
    </simpara>
    <simpara>
     Operates as <function>fprintf</function> but accepts an array of
     arguments, rather than a variable number of arguments.
    </simpara>
    <simpara>
     Returns the length of the outputted string.
    </simpara>
    <simpara>
     See also: <function>printf</function>,
     <function>sprintf</function>,
     <function>sscanf</function>, <function>fscanf</function>, 
     <function>vsprintf</function>, and
     <function>number_format</function>.
    </simpara>
   </refsect1>
   <refsect1>
    <title>Examples</title>
    <para>
     <example>
      <title><function>vfprintf</function>: zero-padded integers</title>
      <programlisting role="php">
<![CDATA[
<?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
?>
]]>
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Reply via email to