sizeof 函數 sizeof — count() 的别名 參數 數值或變數 返回值: int If your array is "huge" It is reccomended to set a variable first for this case: THIS-> $max = sizeof($huge_array); for($i = 0; $i < $max;$i++) { code... }