Lines Matching refs:tail
127 $tail = 0;
144 $tail = $eof;
147 while ($tail - $head > $this->chunk_size) {
148 $finger = $head + (int)(($tail - $head) / 2);
151 if ($finger == $head || $finger == $tail) {
163 $tail = $finger;
169 if ($tail - $head < 1) {
175 $lines = $this->readChunk($fp, $head, $tail);
177 return [$fp, $lines, $head, $tail, $eof];
186 * @param int $tail end point chunk
189 protected function readChunk($fp, $head, $tail) argument
192 $chunk_size = max($tail - $head, 0); // found chunk size
231 * @param int $tail position tail of last chunk
238 protected function readAdjacentChunk($fp, $head, $tail, $direction) argument
240 if (!$fp) return [[], $head, $tail];
244 $head = $tail;
245 $tail = $head + (int)($this->chunk_size * (2 / 3));
246 $tail = $this->getNewlinepointer($fp, $tail);
249 $tail = $head;
250 $head = max($tail - $this->chunk_size, 0);
254 if ($nl > 0 && $tail <= $nl) {
264 $lines = $this->readChunk($fp, $head, $tail);
265 return [$lines, $head, $tail];