Bug #12610 Updated: vprintf() and other variable arg functions please!

From: Date: Sat, 18 Aug 2001 22:24:35 +0000
Subject: Bug #12610 Updated: vprintf() and other variable arg functions please!
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63638@lists.php.net to get a copy of this message
ID: 12610 User updated by: nutbar@innocent.com Reported By: nutbar@innocent.com 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() badly! Previous Comments: ------------------------------------------------------------------------ [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

« previous php.dev (#63638) next »