title: PHP: if(function_exists('curl_init')) does that work?
body: <p>I have some code that that I only want to execute if <code>curl_init()</code> is present. I'm checking for it's existence with this code:</p>
  
  <pre><code>if(function_exists('curl_init'))
  {
      $c = curl_init();
      curl_setopt($c, CURLOPT_URL, 'http://www.my-site.ext/' . $data . '/');
      curl_setopt($c, CURLOPT_HEADER, 0);
      curl_exec($c);
      curl_close($c);
  }
  </code></pre>
  
  <p>The <code>if()</code> returns true, however the code inside throws this error:</p>
  
  <pre><code>Fatal error: Call to undefined function curl_init() in /var/www/wp-content/plugins/my-plugin-name/inc/myplugin_functions.php on line 15
  </code></pre>
  
  <p>How can I properly check whether <code>curl_init()</code> exists?</p>