does file related functions throw an exception when it fails OR just return false.
Coz even if I use it in try-catch, there is no point in catching an exception if fopen/fwrite does not throw it at all…
does file related functions throw an exception when it fails OR just return false.
Share
Return Values
Returns a file pointer resource on success, or FALSE on error.
Errors/Exceptions
If the open fails, an error of level E_WARNING is generated. You may use @ to suppress this warning.
Check documentation. you can throw custom exception if you want to.