title: Just learning cURL and exec not returning boolean value
body: <p>Morning,</p>
  
  <p>Am just starting to learn cURL. Have found some good tutorials but most say that exec will return true or false. I've tried using console to check but nothing is output.</p>
  
  <pre><code>   &lt;?php
     $curl = curl_init('http://www.techflirt.com');
     $result = curl_exec($curl); // will return true or false
     if($result === false) {
       echo "&lt;script&gt;console.log('Whoops!')&lt;/script&gt;";
     }
     else {
      echo "&lt;script&gt;console.log('TRUE')&lt;/script&gt;";
     }
     curl_close($curl);
     print $result;
     ?&gt;
  </code></pre>