why not using curl_setopts with an array (less function calls)?