<?phpclassDAO{private$sqls=array('getActionMoSucc'=>'select * from xxxx where action=$0',);function__call($method,$args){var_dump($method);var_dump($args);$key=substr($method,3).implode("",$args);var_dump($key);//if($value=$redis->get($key))// return $value;//else$this->getFromMysql($method,$args);}functiongetFromMysql($key,$args){$sql=$this->sqls[$key];foreach($argsas$k=>$v)$sql=str_replace("\$$k",$v,$sql);var_dump($sql);}}$counter=newDAO();$action="TEST";$counter->getActionMoSucc($action);?>