title: PHP CURL vs PECL_HTTP
body: <p>In PHP, you can use PHP file stream functions, like <code>file_get_contents()</code> to handle HTTP requests, but to handle complex HTTP communications, cURL is obviously better and more flexible. I've been using cURL for years and it never fails me.</p>
  
  <p>Recently, I tried to test the PECL_HTTP extension, and found that it's even simpler and works great on most HTTP requests, at least at first. However, I still have doubts about the PECL_HTTP extension. </p>
  
  <p>So, is PECL_HTTP as powerful and flexible as cURL? Especially for different kinds of complex HTTP communications? Although PECL_HTTP can shorten your code and make it easier to handle most "regular" HTTP requests, what about more complex HTTP requests?</p>
  
  <p>Here are some disadvantages of PECL_HTTP compared to cURL which I already know:</p>
  
  <ol>
  <li>cURL comes with most PHP and Linux distributions, while the PECL_HTTP extension requires an additional installation.</li>
  <li>cURL uses the same coding interface for different languages, while PECL_HTTP version 2 is not even compatible with version 1. A totally different API interface is employed in PECL_HTTP version 2.</li>
  </ol>
  
  <p>Besides simpler and shorter code, is there any other advantage of PECL_HTTP over cURL?</p>