I used the non-existent PHP delete function to try to delete a file, causing my script to hang with a white screen of death.

Of course, you should use the unlink function. The funny part is that there is a page in the PHP online manual for delete put there for people looking to find the unlink function. But if you skim read the page like I did, you may miss the fact that the function is void.