--TEST-- curl_copy_handle() allows to post CURLFile multiple times with curl_multi_exec() --SKIPIF-- --FILE-- $file); var_dump(curl_setopt($ch1, CURLOPT_POSTFIELDS, $params)); $ch2 = curl_copy_handle($ch1); $ch3 = curl_copy_handle($ch1); $mh = curl_multi_init(); curl_multi_add_handle($mh, $ch1); curl_multi_add_handle($mh, $ch2); do { $status = curl_multi_exec($mh, $active); if ($active) { curl_multi_select($mh); } } while ($active && $status == CURLM_OK); curl_multi_remove_handle($mh, $ch1); curl_multi_remove_handle($mh, $ch2); curl_multi_remove_handle($mh, $ch3); curl_multi_close($mh); ?> ===DONE=== --EXPECTF-- bool(true) АБВ.txt|application/octet-stream|5АБВ.txt|application/octet-stream|5===DONE=== --CLEAN--