Skip to content

Instantly share code, notes, and snippets.

@s-tajima
Created February 20, 2015 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-tajima/854936acc9526cd812b2 to your computer and use it in GitHub Desktop.
Save s-tajima/854936acc9526cd812b2 to your computer and use it in GitHub Desktop.
curl memory leak test
<?php
require_once 'HTTP/Request2.php';
function req()
{
$http = new HTTP_Request2("https://google.com/");
$http->setConfig(array(
'follow_redirects' => true,
'max_redirects' => 5,
'timeout' => 10,
'ssl_verify_peer' => false,
'ssl_verify_host' => true,
));
$http->setAdapter('curl');
$http->setMethod(HTTP_Request2::METHOD_GET);
$response = $http->send();
return $response->getBody();
}
req();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment