Some of the wierder examples below confused me, and made me think that the following would work (but it does!).
<?php
class barber{
function shop($one,$two,$three,$four='quartet'){
echo $one.','.$two.','.$three.','.$four;
}
}
$bsq = new barber;
call_user_func(array(&$bsq,'shop'),'one','two','three');
class bigBarber{
var $quartet;
function bigBarber(){
$this->quartet = 'four';
}
function shop($one,$two,$three,$five='quintet'){
echo $one.','.$two.','.$three.','.$this->quartet.','.$five;
}
}
$bbsq = new bigBarber();
call_user_func(array(&$bbsq,'shop'),'one','two','three');
?>