(PHP 5 >= 5.1.0)
SplFileObject::eof — رسیدن به انتهای فایل
تعیین رسیدن به انتهای فایل
This function has no parameters.
بازگرداندن TRUE اگر فایل در EOF باشد در غیر این صورت FALSE.
Example #1 مثال SplFileObject::eof()
<?php
$file = new SplFileObject("fruits.txt");
while ( ! $file->eof()) {
echo $file->fgets();
}
?>
The above example will output something similar to:
apple banana cherry date elderberry