3v4l.org

run code in 300+ PHP versions simultaneously
<?php // THIS IS SYNC CODE /** Make the calls **/ foreach ($callsToMake as $serverClients) { foreach ($serverClients as $keys) { /** @var ConnectionConfig $clientConfig */ $clientConfig = $keys['config']; /** Transport returns json **/ $transport = $this->transportFactory->build($this->client, $this->request, $clientConfig); /** Adapter returns Torrent objects **/ $adapter = $this->adapterFactory->build($transport); $torrents = array_merge($torrents, $adapter->getTorrents($keys['hashes'])); } } return $torrents; // TRYING TO MAKE IT ASYNC WITH $callable /** Make the calls **/ foreach ($callsToMake as $serverClients) { foreach ($serverClients as $keys) { /** @var ConnectionConfig $clientConfig */ $clientConfig = $keys['config']; /** Transport returns json **/ $transport = $this->transportFactory->build($this->client, $this->request, $clientConfig, $async = true); /** Adapter returns Torrent objects **/ $adapter = $this->adapterFactory->build($transport); $torrents = array_merge($torrents, $adapter->getTorrents($keys['hashes'], $callable)); // Obviously, this will only happen once } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 39
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 39
Branch analysis from position: 2
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 37
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 37
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 37
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/iq4P8
function name:  (null)
number of ops:  85
compiled vars:  !0 = $callsToMake, !1 = $serverClients, !2 = $keys, !3 = $clientConfig, !4 = $transport, !5 = $adapter, !6 = $torrents, !7 = $async, !8 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > FE_RESET_R                                       $9      !0, ->39
          1    > > FE_FETCH_R                                               $9, !1, ->39
    8     2    > > FE_RESET_R                                       $10     !1, ->37
          3    > > FE_FETCH_R                                               $10, !2, ->37
   11     4    >   FETCH_DIM_R                                      ~11     !2, 'config'
          5        ASSIGN                                                   !3, ~11
   14     6        FETCH_THIS                                       $13     
          7        FETCH_OBJ_R                                      ~14     $13, 'transportFactory'
          8        INIT_METHOD_CALL                                         ~14, 'build'
          9        CHECK_FUNC_ARG                                           
         10        FETCH_THIS                                       $15     
         11        FETCH_OBJ_FUNC_ARG                               $16     $15, 'client'
         12        SEND_FUNC_ARG                                            $16
         13        CHECK_FUNC_ARG                                           
         14        FETCH_THIS                                       $17     
         15        FETCH_OBJ_FUNC_ARG                               $18     $17, 'request'
         16        SEND_FUNC_ARG                                            $18
         17        SEND_VAR_EX                                              !3
         18        DO_FCALL                                      0  $19     
         19        ASSIGN                                                   !4, $19
   17    20        FETCH_THIS                                       $21     
         21        FETCH_OBJ_R                                      ~22     $21, 'adapterFactory'
         22        INIT_METHOD_CALL                                         ~22, 'build'
         23        SEND_VAR_EX                                              !4
         24        DO_FCALL                                      0  $23     
         25        ASSIGN                                                   !5, $23
   19    26        INIT_FCALL                                               'array_merge'
         27        SEND_VAR                                                 !6
         28        INIT_METHOD_CALL                                         !5, 'getTorrents'
         29        CHECK_FUNC_ARG                                           
         30        FETCH_DIM_FUNC_ARG                               $25     !2, 'hashes'
         31        SEND_FUNC_ARG                                            $25
         32        DO_FCALL                                      0  $26     
         33        SEND_VAR                                                 $26
         34        DO_ICALL                                         $27     
         35        ASSIGN                                                   !6, $27
    8    36      > JMP                                                      ->3
         37    >   FE_FREE                                                  $10
    6    38      > JMP                                                      ->1
         39    >   FE_FREE                                                  $9
   23    40      > RETURN                                                   !6
   29    41*       FE_RESET_R                                       $29     !0, ->83
         42*       FE_FETCH_R                                               $29, !1, ->83
   31    43*       FE_RESET_R                                       $30     !1, ->81
         44*       FE_FETCH_R                                               $30, !2, ->81
   34    45*       FETCH_DIM_R                                      ~31     !2, 'config'
         46*       ASSIGN                                                   !3, ~31
   37    47*       FETCH_THIS                                       $33     
         48*       FETCH_OBJ_R                                      ~34     $33, 'transportFactory'
         49*       INIT_METHOD_CALL                                         ~34, 'build'
         50*       CHECK_FUNC_ARG                                           
         51*       FETCH_THIS                                       $35     
         52*       FETCH_OBJ_FUNC_ARG                               $36     $35, 'client'
         53*       SEND_FUNC_ARG                                            $36
         54*       CHECK_FUNC_ARG                                           
         55*       FETCH_THIS                                       $37     
         56*       FETCH_OBJ_FUNC_ARG                               $38     $37, 'request'
         57*       SEND_FUNC_ARG                                            $38
         58*       SEND_VAR_EX                                              !3
         59*       ASSIGN                                           ~39     !7, <true>
         60*       SEND_VAL_EX                                              ~39
         61*       DO_FCALL                                      0  $40     
         62*       ASSIGN                                                   !4, $40
   40    63*       FETCH_THIS                                       $42     
         64*       FETCH_OBJ_R                                      ~43     $42, 'adapterFactory'
         65*       INIT_METHOD_CALL                                         ~43, 'build'
         66*       SEND_VAR_EX                                              !4
         67*       DO_FCALL                                      0  $44     
         68*       ASSIGN                                                   !5, $44
   42    69*       INIT_FCALL                                               'array_merge'
         70*       SEND_VAR                                                 !6
         71*       INIT_METHOD_CALL                                         !5, 'getTorrents'
         72*       CHECK_FUNC_ARG                                           
         73*       FETCH_DIM_FUNC_ARG                               $46     !2, 'hashes'
         74*       SEND_FUNC_ARG                                            $46
         75*       SEND_VAR_EX                                              !8
         76*       DO_FCALL                                      0  $47     
         77*       SEND_VAR                                                 $47
         78*       DO_ICALL                                         $48     
         79*       ASSIGN                                                   !6, $48
   31    80*       JMP                                                      ->44
         81*       FE_FREE                                                  $30
   29    82*       JMP                                                      ->42
         83*       FE_FREE                                                  $29
   44    84*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.77 ms | 1404 KiB | 15 Q