How do I define a function within a class and method is empty, method would change the calling class (as delegate in c#) The following error codes are:
class myclass{
public $num1=0;
public function func($a,$b);
}
$c=new myclass();
$c->func=function($a,$b){
return $a+$b;
}
$c->func(4,8);// is error