title: PHP/cURL curl_exec() error?
body: <p>This is my first time using cURL so it might be a silly error on my part but the following code: </p>
  
  <pre><code>    $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      $output = curl_exec($ch);
      curl_close($ch);
      echo $output;
  </code></pre>
  
  <p>Prints "1". It is my understanding that CURLOPT_RETURNTRANSFER should ensure that curl_exec returns either 0 or the content but here it's behaving as if CURLOPT_RETURNTRANSFER hasn't been set to true. Am I missing something obvious?</p>
  
  <p>Thanks! </p>