Translated the Python interrupt handler to PHP

Based on rrworker.php from Ian Barber, added interrupt detection using pcntl (the only possible way that I know)