3v4l.org

run code in 300+ PHP versions simultaneously
<?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';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 9
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 34
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 45
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 45
Branch analysis from position: 58
Branch analysis from position: 45
Branch analysis from position: 34
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 9
Branch analysis from position: 33
Branch analysis from position: 9
filename:       /in/RkZLb
function name:  (null)
number of ops:  60
compiled vars:  !0 = $nodes, !1 = $node_count, !2 = $curl_arr, !3 = $master, !4 = $i, !5 = $url, !6 = $times, !7 = $running, !8 = $results
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        COUNT                                            ~10     !0
          2        ASSIGN                                                   !1, ~10
    6     3        ASSIGN                                                   !2, <array>
    7     4        INIT_FCALL_BY_NAME                                       'curl_multi_init'
          5        DO_FCALL                                      0  $13     
          6        ASSIGN                                                   !3, $13
    9     7        ASSIGN                                                   !4, 0
          8      > JMP                                                      ->31
   11     9    >   FETCH_DIM_R                                      ~16     !0, !4
         10        ASSIGN                                                   !5, ~16
   12    11        INIT_FCALL_BY_NAME                                       'curl_init'
         12        SEND_VAR_EX                                              !5
         13        DO_FCALL                                      0  $19     
         14        ASSIGN_DIM                                               !2, !4
         15        OP_DATA                                                  $19
   13    16        INIT_FCALL_BY_NAME                                       'curl_setopt'
         17        CHECK_FUNC_ARG                                           
         18        FETCH_DIM_FUNC_ARG                               $20     !2, !4
         19        SEND_FUNC_ARG                                            $20
         20        FETCH_CONSTANT                                   ~21     'CURLOPT_RETURNTRANSFER'
         21        SEND_VAL_EX                                              ~21
         22        SEND_VAL_EX                                              <true>
         23        DO_FCALL                                      0          
   14    24        INIT_FCALL_BY_NAME                                       'curl_multi_add_handle'
         25        SEND_VAR_EX                                              !3
         26        CHECK_FUNC_ARG                                           
         27        FETCH_DIM_FUNC_ARG                               $23     !2, !4
         28        SEND_FUNC_ARG                                            $23
         29        DO_FCALL                                      0          
    9    30        PRE_INC                                                  !4
         31    >   IS_SMALLER                                               !4, !1
         32      > JMPNZ                                                    ~26, ->9
   17    33    >   ASSIGN                                                   !6, 0
   19    34    >   PRE_INC                                          ~28     !6
         35        ECHO                                                     ~28
   20    36        INIT_FCALL_BY_NAME                                       'curl_multi_exec'
         37        SEND_VAR_EX                                              !3
         38        SEND_VAR_EX                                              !7
         39        DO_FCALL                                      0          
   21    40        IS_SMALLER                                               0, !7
         41      > JMPNZ                                                    ~30, ->34
   23    42    >   ECHO                                                     'results%3A+'
   24    43        ASSIGN                                                   !4, 0
         44      > JMP                                                      ->56
   26    45    >   INIT_FCALL_BY_NAME                                       'curl_multi_getcontent'
         46        CHECK_FUNC_ARG                                           
         47        FETCH_DIM_FUNC_ARG                               $32     !2, !4
         48        SEND_FUNC_ARG                                            $32
         49        DO_FCALL                                      0  $33     
         50        ASSIGN                                                   !8, $33
   27    51        CONCAT                                           ~35     !4, '%0A'
         52        CONCAT                                           ~36     ~35, !8
         53        CONCAT                                           ~37     ~36, '%0A'
         54        ECHO                                                     ~37
   24    55        PRE_INC                                                  !4
         56    >   IS_SMALLER                                               !4, !1
         57      > JMPNZ                                                    ~39, ->45
   29    58    >   ECHO                                                     'done'
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.15 ms | 1399 KiB | 13 Q