Bug #12610 Updated: vaprintf() and other va_arg functions please!
| From: | hholzgra@php.net | Date: | Mon, 17 Jun 2002 18:05:31 +0000 |
| Subject: | Bug #12610 Updated: vaprintf() and other va_arg functions please! | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10899@lists.php.net to get a copy of this message | ||
ID: 12610
Updated by: hholzgra@php.net
Reported By: nutbar@innocent.com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 4.0.6
New Comment:
http://php.net/vprintf
Previous Comments:
------------------------------------------------------------------------
[2001-08-18 18:24:35] nutbar@innocent.com
Sorry, should be vprintf() and friends, not vaprintf(). Also, I'm sure
this isn't too hard... if I could understand what was going on in the
code for call_user_func_array, I'm sure I could make vprintf() at
least.
I would really like to see vprintf() at least in the next release of
PHP. Others like vsprintf() or whatever I don't really need right now,
but I really need vprintf() badly!
------------------------------------------------------------------------
[2001-08-07 01:42:11] nutbar@innocent.com
I would love to have access to variable length argument functions such
as vaprintf(), vasprintf(), etc... so I can easily use func_get_args()
in a function and then pass all remaining arguments to a function that
can accept arguments in an array format, similar to
call_user_func_array, except for non-user defined functions.
Small example:
function tprintf() {
clearstatcache();
$arg_list = func_get_args();
$filename = array_shift($arg_list);
if (($fd = @fopen($filename, "r"))) {
rewind($fd);
$contents = fread($fd, filesize($filename));
fclose($fd);
}
return vaprintf($contents, $arg_list);
}
Thanks in advance!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12610&edit=1