From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.6
PHP Bug Type:     Feature/Change Request
Bug description:  vaprintf() and other va_arg functions please!

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 bug report at: http://bugs.php.net/?id=12610&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
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