Parse error: syntax error, unexpected token "public", expecting end of file in /var/www/html/PHP-and-MySQL-Web-Development/Chapter06/overloading-methods-with-call-pag-188/overloading-methods-with-call.php on line 2
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]);
}
}
}
$ov = new overload;
$ov->display(array(1,2,3));
$ov->display('cat');