Keep your PHP scripts running indefinitely

A while ago I needed to keep a PHP script running on my server indefinitely, even after closing my SSH connection. The easiest method I could find was using nohup.

nohup php myscript.php