3v4l.org

run code in 300+ PHP versions simultaneously
<?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));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 27
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 27
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 42
Branch analysis from position: 39
2 jumps found. (Code = 47) Position 1 = 45, Position 2 = 46
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 28
Branch analysis from position: 47
2 jumps found. (Code = 77) Position 1 = 48, Position 2 = 63
Branch analysis from position: 48
2 jumps found. (Code = 78) Position 1 = 49, Position 2 = 63
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
Branch analysis from position: 63
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
Branch analysis from position: 28
Branch analysis from position: 46
Branch analysis from position: 42
Branch analysis from position: 27
filename:       /in/Q2M1p
function name:  (null)
number of ops:  71
compiled vars:  !0 = $urls, !1 = $mh, !2 = $url, !3 = $i, !4 = $conn, !5 = $status, !6 = $active, !7 = $info, !8 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL_BY_NAME                                       'curl_multi_init'
          2        DO_FCALL                                      0  $10     
          3        ASSIGN                                                   !1, $10
   10     4      > FE_RESET_R                                       $12     !0, ->27
          5    > > FE_FETCH_R                                       ~13     $12, !2, ->27
          6    >   ASSIGN                                                   !3, ~13
   11     7        INIT_FCALL_BY_NAME                                       'curl_init'
          8        SEND_VAR_EX                                              !2
          9        DO_FCALL                                      0  $16     
         10        ASSIGN_DIM                                               !4, !3
         11        OP_DATA                                                  $16
   12    12        INIT_FCALL_BY_NAME                                       'curl_setopt'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $17     !4, !3
         15        SEND_FUNC_ARG                                            $17
         16        FETCH_CONSTANT                                   ~18     'CURLOPT_RETURNTRANSFER'
         17        SEND_VAL_EX                                              ~18
         18        SEND_VAL_EX                                              1
         19        DO_FCALL                                      0          
   13    20        INIT_FCALL_BY_NAME                                       'curl_multi_add_handle'
         21        SEND_VAR_EX                                              !1
         22        CHECK_FUNC_ARG                                           
         23        FETCH_DIM_FUNC_ARG                               $20     !4, !3
         24        SEND_FUNC_ARG                                            $20
         25        DO_FCALL                                      0          
   10    26      > JMP                                                      ->5
         27    >   FE_FREE                                                  $12
   17    28    >   INIT_FCALL_BY_NAME                                       'curl_multi_exec'
         29        SEND_VAR_EX                                              !1
         30        SEND_VAR_EX                                              !6
         31        DO_FCALL                                      0  $22     
         32        ASSIGN                                                   !5, $22
   18    33        INIT_FCALL_BY_NAME                                       'curl_multi_info_read'
         34        SEND_VAR_EX                                              !1
         35        DO_FCALL                                      0  $24     
         36        ASSIGN                                                   !7, $24
   19    37        TYPE_CHECK                                  1018          !7
         38      > JMPZ                                                     ~26, ->42
   20    39    >   INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !7
         41        DO_ICALL                                                 
   22    42    >   FETCH_CONSTANT                                   ~28     'CURLM_CALL_MULTI_PERFORM'
         43        IS_IDENTICAL                                     ~29     !5, ~28
         44      > JMPNZ_EX                                         ~29     ~29, ->46
         45    >   BOOL                                             ~29     !6
         46    > > JMPNZ                                                    ~29, ->28
   24    47    > > FE_RESET_R                                       $30     !0, ->63
         48    > > FE_FETCH_R                                       ~31     $30, !2, ->63
         49    >   ASSIGN                                                   !3, ~31
   25    50        INIT_FCALL_BY_NAME                                       'curl_multi_getcontent'
         51        CHECK_FUNC_ARG                                           
         52        FETCH_DIM_FUNC_ARG                               $34     !4, !3
         53        SEND_FUNC_ARG                                            $34
         54        DO_FCALL                                      0  $35     
         55        ASSIGN_DIM                                               !8, !3
         56        OP_DATA                                                  $35
   26    57        INIT_FCALL_BY_NAME                                       'curl_close'
         58        CHECK_FUNC_ARG                                           
         59        FETCH_DIM_FUNC_ARG                               $36     !4, !3
         60        SEND_FUNC_ARG                                            $36
         61        DO_FCALL                                      0          
   24    62      > JMP                                                      ->48
         63    >   FE_FREE                                                  $30
   29    64        INIT_FCALL                                               'var_dump'
         65        INIT_FCALL_BY_NAME                                       'curl_multi_info_read'
         66        SEND_VAR_EX                                              !1
         67        DO_FCALL                                      0  $38     
         68        SEND_VAR                                                 $38
         69        DO_ICALL                                                 
         70      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.51 ms | 1405 KiB | 15 Q