I use this code with php:
while (0 != $date1 || $this->counter < 5 ) { // if ($this->true_cahce_failure ) { $this->url= $this->adjust_url_with_www_add($this->url); // $this->counter=2; // } $this->cache_debug("Date".$date1." ".$this->url,"Recursion ".$this->counter); $date1 = $this->get_date(); $this->counter++; } $this->cache_debug("Date: ".$date1." ".$this->url,"Loop Done "); Basically the loop should continue until either $date is not 0 or counter isn't bigger than 5. Sometimes the date1 has got 0 but sometimes not. When it doesn't it should return in the while evaluation, and stop the iteration. But it doesn't do so and the iteration continues.
It only stops with counter reaches 5. Why is that?