3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $urls = array( "http://www.cnn.com/", "http://www.bbc.co.uk/", "http://www.yahoo.com/" ); $mh = curl_multi_init(); foreach ($urls as $i => $url) { $conn[$i] = curl_init($url); curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1); curl_multi_add_handle($mh, $conn[$i]); } do { $status = curl_multi_exec($mh, $active); $info = curl_multi_info_read($mh); if (false !== $info) { var_dump($info); } } while ($status === CURLM_CALL_MULTI_PERFORM || $active); foreach ($urls as $i => $url) { $res[$i] = curl_multi_getcontent($conn[$i]); curl_close($conn[$i]); } var_dump(curl_multi_info_read($mh));
based on sa9fI
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /in/Q2M1p:8 Stack trace: #0 {main} thrown in /in/Q2M1p on line 8
Process exited with code 255.
Output for hhvm-3.12.0
array(3) { ["msg"]=> int(1) ["result"]=> int(6) ["handle"]=> resource(5) of type (curl) } array(3) { ["msg"]=> int(1) ["result"]=> int(6) ["handle"]=> resource(6) of type (curl) } array(3) { ["msg"]=> int(1) ["result"]=> int(6) ["handle"]=> resource(7) of type (curl) } bool(false)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function curl_multi_init() in /in/Q2M1p on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_multi_init() in /in/Q2M1p on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_multi_init() in /in/Q2M1p on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl_multi_init() in /in/Q2M1p on line 8