To ensure a file resource is closed and memory is freed up, you should use the ________ function in PHP.
- close_file()
- flush()
- fclose()
- release_memory()
The fclose() function in PHP is used to close an open file resource. This ensures that the file is properly closed, and associated memory is released.
Loading...
Related Quiz
- What can be the potential issues with a foreach loop in PHP?
- You are developing a PHP web application and want to ensure that any PHP errors do not reveal sensitive information to the users. Which approach would you take?
- What is the main purpose of a constructor in a PHP class?
- What can be potential issues when working with the $_POST superglobal in PHP?
- A constant of a PHP class can be accessed using the class name followed by the scope resolution operator (::) and the constant name.