3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cm = curl_multi_init(); $stuffs = curl_init(); $curl_options = array( CURLOPT_URL => 'http://www.google.ca', CURLOPT_RETURNTRANSFER => 1, CURLOPT_SSL_VERIFYHOST => 0, // these are the problem CURLOPT_SSL_VERIFYPEER => 0, // toggle 0/1 to test CURLOPT_HEADER => 1 ); curl_setopt_array($stuffs, $curl_options); curl_multi_add_handle($cm, $stuffs); do { curl_multi_exec($cm, $running); } while($running > 0); $content = curl_multi_getcontent($stuffs); $info = curl_getinfo($stuffs); curl_multi_remove_handle($cm, $stuffs); curl_multi_close($cm); print_r($info); // cuts off too much, the header size is incorrect echo mb_substr($content, $info['header_size']); ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /in/eLNs2:3 Stack trace: #0 {main} thrown in /in/eLNs2 on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Array ( [url] => http://www.google.ca/ [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [local_port] => 0 [total_time] => 0.00054 [namelookup_time] => 0 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 )
Output for hhvm-3.10.0
Array ( [url] => http://www.google.ca/ [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [local_port] => 0 [total_time] => 0.000555 [namelookup_time] => 0 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 )
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function curl_multi_init() in /in/eLNs2 on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_multi_init() in /in/eLNs2 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_multi_init() in /in/eLNs2 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl_multi_init() in /in/eLNs2 on line 3