public function __call($method,$p){
if($method =="display"){
if(is_object($p[0])){
$this->displayObject($p[0]);
} else if (is_array($p[0])){
$this->displayArray($p[0]);
} else {
$this->displayScalar($p[0]);
}
}
}
class overload {
}
$ov = new overload;
$ov->display(array(1,2,3));
$ov->display('cat');
I don't know how to pass the parameters to the function and the class is empty I am beginner with php I try to learn oop