Suppose I have a PHP script, somescript.php that runs every 5 minutes and takes 5 minutes to run each time. This script has a loop in it like:
for($x = 0; $x <= 100; $x++ )
{
$variable = "good";
...[rest of code]
}
Is it possible to change the value of $variable while somescript.php is actively running in a way that if before changing the value of $variable the loop iteration was at 50, whereas after the change, for iterations 51-100, they will use the new value of $variable (ideally within Ubuntu)?
I don't always want the value to change. Suppose after running the script, I realized $variable has the wrong value and want to change its value without stopping the script?
if ($x==50) $variable = "new";?$variablehas the wrong value and want to change its value without stopping the script?