ID: 12610
User updated by: [EMAIL PROTECTED]
Old Summary: vaprintf() and other va_arg functions please!
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 4.0.6
New Comment:

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() 

Previous Comments:

[2001-08-07 01:42:11] [EMAIL PROTECTED]

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() {
        $arg_list = func_get_args();
        $filename = array_shift($arg_list);
        if (($fd = @fopen($filename, "r"))) {
                $contents = fread($fd, filesize($filename));
        return vaprintf($contents, $arg_list);

Thanks in advance!


Edit this bug report at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to