PHP - exit or return which is better?
<p>I would like to know in the following case which is a better solution:</p>

<p>In the PHP script, if the fileSize is larger than 100 then I stop the script.</p>

<pre><code>&lt;?php
...
if ($fileSize &gt; 100) // case I
{
   $results['msg'] = 'fileSize is too big!';
   echo json_encode($results);
   exit();
}

?&gt;

&lt;?php
...
if ($fileSize &gt; 100) // case II
{
   $results['msg'] = 'fileSize is too big!';
   exit( json_encode($results) );
}

?&gt;

&lt;?php
...
if ($fileSize &gt; 100) // case III
{
   $results['msg'] = 'fileSize is too big!';
   return( json_encode($results) );
}

?&gt;
</code></pre>

<p>which is a best solution?</p>

<p>Thank you</p>
