A convenience wrapper around curl_multi_await

namespace HH\Asio;

function curl_exec(
  mixed $url_or_handle,
): Awaitable<string>;

Pass a cURL handle, or, more simply, a string containing a URL (and the cURL handle will be created for you), and the cURL request will be executed via async and the string result will be returned.

curl_multi_info_read must be used to retrieve error information, curl_errno can't be used as this function is a wrapper to curl_multi_await.


  • mixed $url_or_handle

Return Values