Long running PHP scripts
If we have a PHP script that may run for longer than 30 seconds (eg - looping through lots of database data), we can start our code as follows:
<?php
set_time_limit(0);
?>
This will give the php script potentially infinite running time. In some cases, we might want to add this too which has the script continue running even if the browser is closed:
ignore_user_abort();
