為啥我遞歸遍歷,然后獲取不到值了?
public function aaaaAction() {
$a = $this->test([],0);
$this->newLog(__FUNCTION__,"aaa","測(cè)試",json_encode($a));
}
public function test($result,$a) {
if($a < 200) {
$a++;
array_push($result,"123");
$this->test($result,$a);
} else {
$ccc = $result;
$this->newLog(__FUNCTION__,"aaa","嘿嘿嘿",json_encode($result));
return $ccc;
}
}
請(qǐng)問(wèn)這段代碼有啥問(wèn)題?
喵喵時(shí)光機(jī)
2019-03-09 15:28:11