怎么让这个class在每个function 里面有作用?把类的对象传
给函数不就行了?
$db=new class;
function abc($db,$a){
$db->return($a);
}
多写一个参数