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--SKIPIF--
6<?php
7if (!extension_loaded('curl')) { print("skip"); }
8?>
9--FILE--
10<?php
11$urls = array(
12    "file://".__DIR__."/curl_testdata1.txt",
13    "file://".__DIR__."/curl_testdata2.txt",
14);
15
16$mh = curl_multi_init();
17foreach ($urls as $i => $url) {
18    $conn[$i] = curl_init($url);
19    curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
20    curl_multi_add_handle($mh, $conn[$i]);
21}
22
23do {
24    $status = curl_multi_exec($mh, $active);
25} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
26
27while ($info = curl_multi_info_read($mh)) {
28    var_dump($info);
29}
30
31foreach ($urls as $i => $url) {
32    curl_close($conn[$i]);
33}
34?>
35--EXPECTF--
36array(3) {
37  ["msg"]=>
38  int(%d)
39  ["result"]=>
40  int(%d)
41  ["handle"]=>
42  object(CurlHandle)#%d (0) {
43  }
44}
45array(3) {
46  ["msg"]=>
47  int(%d)
48  ["result"]=>
49  int(%d)
50  ["handle"]=>
51  object(CurlHandle)#%d (0) {
52  }
53}
54