I have a function that is always called like this:
old_function(sprintf("Some arbitrary data %d, %s, %f\n", $i, $s, $f));
Is it possible in PHP to make a function that combines these to functions for
new_function("Some arbitrary data %d, %s, %f\n", $i, $s, $f);
In the beginning of new_function, the variable argument list of the function would have to be parsed and passed to sprintf internally:
function new_function( /* variable argument list */ )
{
$string = sprintf( /* variable argument list */ );
return old_function($string);
}
Is it possible in PHP?