Have you thought of passing the variables as an array in some way?
In that case you only include the variables you need to update
function basicFunction ( $arrayvar ){
$arrayvar['var1']...
Update: Also you might use the func_get_args()-function that works like the first feature here