- vsprintf: documentation ( source)
- array_shift: documentation ( source)
<?php
function info() {
$data = func_get_args();
$format = array_shift($data);
$message = vsprintf($format, $data);
echo $message;
}
info('20% off');