Just wanted to know, how PHP
will work in the following case?
Suppose I have cron
script which is running every minute.
OR there is infinite loop script which is processing the queue table.
Now suppose I am updating any related class file which is used in infinite loop script.
Does it generate any error or stop the infinite loop script?
And what are the good practices need to follow in such situation?
Nothing will happen to already running scripts when you change any source code.
The source code is read from the file once at the start of the script, is parsed into bytecode, and then stays in memory until the end of the script. Your program is not actually "running from source" all the time or any such thing and it will not notice any changes to the source code files until it needs to load the file again.
An infinite loop program will only reflect changes when you stop and restart it.
A cron job will pick up any change the next time it runs.