3 ms·
Apart from all of the other considerations outlined here we also have a claim of increased disk performance without any actual evidence that this is the case.
by jiggy2011 14y ago
Apart from all of the other considerations outlined here we also have a claim of increased disk performance without any actual evidence that this is the case.
Surely file_exists() is simply an operation on the disk index where the relevant block will be sitting in RAM from the first point that the operation is done. Subsequent operations on the same data shouldn't involve hitting the disk again until an actual write has occurred. Provided you have sufficient RAM this sort of thing is what kernel page cache is designed for.
Not to mention that thinking about a frequently used performance critical piece of PHP code doing large amounts of @fopen() and @unlink() fills me with dread.