1--TEST--
2array curl_multi_info_read ( resource $mh [, int &$msgs_in_queue = NULL ] );
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
5--EXTENSIONS--
6curl
7--FILE--
8<?php
9$urls = array(
10    "file://".__DIR__."/curl_testdata1.txt",
11    "file://".__DIR__."/curl_testdata2.txt",
12);
13
14$mh = curl_multi_init();
15foreach ($urls as $i => $url) {
16    $conn[$i] = curl_init($url);
17    curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
18    curl_multi_add_handle($mh, $conn[$i]);
19}
20
21do {
22    $status = curl_multi_exec($mh, $active);
23} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
24
25while ($info = curl_multi_info_read($mh)) {
26    var_dump($info);
27}
28
29foreach ($urls as $i => $url) {
30    curl_close($conn[$i]);
31}
32?>
33--EXPECTF--
34array(3) {
35  ["msg"]=>
36  int(%d)
37  ["result"]=>
38  int(%d)
39  ["handle"]=>
40  object(CurlHandle)#%d (0) {
41  }
42}
43array(3) {
44  ["msg"]=>
45  int(%d)
46  ["result"]=>
47  int(%d)
48  ["handle"]=>
49  object(CurlHandle)#%d (0) {
50  }
51}
52