📜  file_get_contents vs readfile 速度 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:02.835000             🧑  作者: Mango

代码示例1
readfile vs file_get_contents SPEED 
(SIMILAR IF YOU DON'T ECHO THE RESULTS)

1) readfile()
will read the file directly into the output buffer
  
2) file_get_contents() will load the file into memory, 
ONLY if you echo the result IT WILL BE COPYING from memory to the output buffer 
using 2 times the memory of readfile().