3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nodes = array('http://www.google.com', 'http://www.microsoft.com', 'http://www.rustyrazorblade.com'); $node_count = count($nodes); $curl_arr = array(); $master = curl_multi_init(); for($i = 0; $i < $node_count; $i++) { $url =$nodes[$i]; $curl_arr[$i] = curl_init($url); curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, true); curl_multi_add_handle($master, $curl_arr[$i]); } $times = 0; do { echo ++$times; curl_multi_exec($master,$running); } while($running > 0); echo "results: "; for($i = 0; $i < $node_count; $i++) { $results = curl_multi_getcontent ( $curl_arr[$i] ); echo( $i . "\n" . $results . "\n"); } echo 'done';
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /in/RkZLb:7 Stack trace: #0 {main} thrown in /in/RkZLb on line 7
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function curl_multi_init() in /in/RkZLb on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_multi_init() in /in/RkZLb on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_multi_init() in /in/RkZLb on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl_multi_init() in /in/RkZLb on line 7