How to remove a little code redundancy
<p>Basically I have a code:</p>

<pre><code> $response = myFunction();
</code></pre>

<p>I need to repeat this call if there was an error like this:</p>

<pre><code>do {
   $response = myFunction();

} while ( isset($response['error']) );
</code></pre>

<p>But I want to <code>usleep(500);</code> too if there was an error. I could do like this, but I don't find it so elegant:</p>

<pre><code>do {
   $response = myFunction();

   if (isset($response['error']))
     usleep(500);

} while ( isset($response['error']) );
</code></pre>

<p>What Can i do? Maybe something like this (not very elegant neither)</p>

<pre><code>while( isset($response['error']) &amp;&amp; !usleep(500) );
</code></pre>

<h2>Edit</h2>

<p>There is another possibility... With the use of <code>goto</code>. But I am always reluctant to <code>goto</code> codes</p>

<pre><code>retry:
$response = myFunction();
if (isset($response['error'])) {
  usleep(500);
  goto retry;
}
</code></pre>

<p>To me this seems the most clear and redundancy-free solution.   What do you think?</p>
