$loop = count($line);
for ($i == 1; $i < $loop; $i++)
などとする場合、countの結果はキャッシュされるから
for ($i == 0; $i < count($line); $i++)
の方がベター

とかありますか?