What happens when you try to unlink a file being locked? Let's see... ------------------------------------------------------ (1) Open two terminals. (2) Execute "php lock-and-sleep.php" in a terminal and Execute "php unlink-it.php" in another terminal ------------------------------------------------------ unlink() simply deletes a locked file just like file_get_contents() reads a locked file. file_put_contents() also write locked file. file_put_contents(..,..,,LOCK_EX) is the only one that waits for the file to be unlocked. ------------------------------------------------------ OK, so unlink() won't wait, and that's fine. But what happens to the script(a) what opens and locks a file? when unlink() was done by another script(b), can the script(a) get the content of the file?