|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-18 18:24 UTC] nutbar at innocent dot com
[2002-06-17 14:05 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 10:00:01 2025 UTC |
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!