I’ve got a PHP script that runs from bash/command line. It’s passed variables that I pickup with $argv[x] – question is, if I haven’t got some data yet, I want the script to sleep and try again in 10 seconds.
If I do
if(!empty($filePlease)) { sleep(10); }
Once it wakes up and tries again, does it maintain the argv’s passed?
As long as the execution of the script is not terminated, the state (including variables) is maintained.