MySQL_Narb Posted July 11, 2013 Share Posted July 11, 2013 $page = curl_exec($ch); if(curl_errno($ch) != 0){ return false; } curl_setopt($ch, CURLOPT_URL, ''); $page = curl_exec($ch); curl_close($ch); Quote Link to comment https://forums.phpfreaks.com/topic/280080-will-doing-return-in-a-function-automatically-close-any-curl-connections/ Share on other sites More sharing options...
doddsey_65 Posted July 11, 2013 Share Posted July 11, 2013 No Quote Link to comment https://forums.phpfreaks.com/topic/280080-will-doing-return-in-a-function-automatically-close-any-curl-connections/#findComment-1440353 Share on other sites More sharing options...
exeTrix Posted July 11, 2013 Share Posted July 11, 2013 No, the connection will be closed as part of garbage routine. This means resources are tied up until the end of execution... Not good. Quote Link to comment https://forums.phpfreaks.com/topic/280080-will-doing-return-in-a-function-automatically-close-any-curl-connections/#findComment-1440354 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.