I'm in the middle of planning out the v1.1.x branch of phpBB-CRS, and I'd like to know whether the fopen()/fread()/fclose() function set is more efficient, faster, or simply better than using file_get_contents(), for stability purposes of loading a file's source into the repository viewer..
Additionally, would using the fopen()/fwrite()/fclose() set be faster for writing to a file than file_put_contents()? There's some additional features that I have planned out for 1.1.x that include the necessity to write to files, so knowing which is better for both get and put would be immensely helpful for the next line's development.
fread() and file functions versus file_get_contents()?
- Mr. Bond
- Member
- Posts: 89
- Joined: 30 Mar 2008, 20:34
- Real name: Bobby
- Location: 127.0.0.1 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: fread() and file functions versus file_get_contents()?
I'm not sure about file_get_contents() compared to fopen()/fread()/fclose() but using file_put_contents() is the exact same as calling fopen(), fwrite() and fclose(), file_put_contents() just requires PHP5.
• •
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 20 guests