3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = array('www.roi.ru/api/petition/309.json', 'www.roi.ru/api/petition/401.json'); $urls2 = array('api.vkontakte.ru/method/users.get?uids=1', 'api.vkontakte.ru/method/users.get?uids=2'); $cmh = curl_multi_init(); $tasks = array(); foreach ($urls2 as $url) { $ch = curl_init('https://'.$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $tasks[$url] = $ch; curl_multi_add_handle($cmh, $ch); } $active = null; do { $mrc = curl_multi_exec($cmh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && ($mrc == CURLM_OK)) { if (curl_multi_select($cmh) != -1) { do { $mrc = curl_multi_exec($cmh, $active); $info = curl_multi_info_read($cmh); if ($info['msg'] == CURLMSG_DONE) { $ch = $info['handle']; $url = array_search($ch, $tasks); $tasks[$url] = curl_multi_getcontent($ch); curl_multi_remove_handle($cmh, $ch); curl_close($ch); } } while ($mrc == CURLM_CALL_MULTI_PERFORM); } } curl_multi_close($cmh); echo "<br><pre>"; var_dump($tasks); echo "</pre>"; ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /in/spkev:5 Stack trace: #0 {main} thrown in /in/spkev on line 5
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /in/spkev:5 Stack trace: #0 {main} thrown in /in/spkev on line 5
Process exited with code 255.
Output for 5.5.0 - 5.5.36, 5.6.0 - 5.6.28
Fatal error: Call to undefined function curl_multi_init() in /in/spkev on line 5
Process exited with code 255.

preferences:
211.32 ms | 402 KiB | 217 Q