Do I need to close file_get_contents?

I run file_get_contents() inside the loop, I see a lot of files open in the Apache log. I do not know the reasons for this. Do I need to close the file_get_contents() function after each read?

+6
source share
1 answer

file_get_contents() reads the file and then closes the file. It returns the read data or false , so you do not have a file descriptor for use with fclose() , anyway.

+13
source

Source: https://habr.com/ru/post/956919/


All Articles