There is a function available for you . $text->see('end');