decimals: %1\$u",$number).''<br />''; //56
//vprintf()函数输出格式化的字符串。
//vprintf() 中的 arg 参数位于数组中。数组的元素会被插入主字符串的百分比 (%) 符号处。该函数是逐步执行的。在第一个 % 符号中,插入 arg1,在第二个 % 符号处,插入 arg2,依此类推。
vprintf("vprintf: %s world. Day number %u", array($str,$number)); //vprintf: hello world. Day number 456
echo ''<br />'';
//sprintf() 函数把格式化的字符串写写入一个变量中。
$txt = sprintf("sprintf: %s world. Day number %u",$str,$number);
echo $txt.''<br />''; //sprintf: hello world. Day number 456
//vfprintf() Operates as fprintf() but accepts an array of arguments, rather than a variable number of arguments.
echo vfprintf($file, "vfprintf: %s world! Day number %u", array($str, $number)).''<br />''; //37
//vsprintf() Operates as sprintf() but accepts an array of arguments, rather than a variable number of arguments.
$txt = vsprintf("vsprintf: %s world. Day number %u",array($str,$number));
echo $txt.''<br />''; //vsprintf: hello world. Day number 456
?>