file get contents vs readfile speed

Solutions on MaxInterview for file get contents vs readfile speed by the best coders in the world

showing results for - "file get contents vs readfile speed"
Benjamin
21 Sep 2016
1readfile vs file_get_contents SPEED 
2(SIMILAR IF YOU DON'T ECHO THE RESULTS)
3
41) readfile()
5will read the file directly into the output buffer
6  
72) file_get_contents() will load the file into memory, 
8ONLY if you echo the result IT WILL BE COPYING from memory to the output buffer 
9using 2 times the memory of readfile().