Do return false; halt the script in user defined functions (PHP)
<p>What does return true; and return false; exactly responds in user defined functions? </p>

<pre><code>function valid_image($image, $target, $width, $height = 0) {

        if($image["type"] !== "image/jpeg") {
            alert('File must be of type image/jpeg');
            return false;
        }
        if(file_exists($target.$image['name'])) {
            alert('File Already Exists, Please Choose a Different Name for the File');
            return false;
        }
        return true;
   }
</code></pre>

<p>Considering the above example if the first condition <code>if($image["type"] !== "image/jpeg"</code> returns true. Does the return false; statement right below it stop the script from executing the below code ? </p>
