protected function find($pos, $token, $limit = 10) { $i = $pos; $o = $this->node->tokens; $c = $this->node->token_count; while (++$i < $c) { if ($o[$i][0] == $token) { return $i; } if (!empty($limit) && $i - $pos == $limit) { break; } } return false; }