对数组里面的索引进行计算,这种方式好吗?
1:
if ($this->inPenaltyBox[$this->currentPlayer[$this->count]]){
}
2:
$count = $this->count;
$currentPlayer = $this->currentPlayer[$count];
$inPenaltyBox = $this->PenaltyBox[$currentPlay];
这两种方式哪种比较好?
推荐文章: