These are all excellent suggestions. I will try to tweek the code a bit, but I'm kinda hoping that the chances for a repeat are pretty low for the number of participants that I am looking for.
Many are old and may no longer valid with current PHP versions but there is dependency to other code parts (like libc rand()) which can change from environment to environment.