read file small code
can you guys tell me whats diff in both codes?
which one will be better to use. Code1: PHP Code:
PHP Code:
|
Re: read file small code
Code:
feofCode:
fgets |
Re: read file small code
Quote:
|
Re: read file small code
In your case, feof is redundant, by how I've tried to explain both. So fgets.
|
Re: read file small code
If you are asking which one is more efficient: IT DOES NOT MATTER.
|
Re: read file small code
I think the fgets() method gets the nod to efficiency. Would it ever be noticeable? no, but on paper it is more efficient.
|
Re: read file small code
I remember someone posting that feof() shouldn't be used for the condition in a while loop like this for some low-level reason. I'd have to search around to see if I could find it again.
Found it: https://forums.alliedmods.net/showthread.php?t=310086 |
Re: read file small code
Thanks :)
|
| All times are GMT -4. The time now is 02:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.