3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = [ array_combine(range(1,10), range(1,10)), array_combine(range(11,20), range(11,20)), array_combine(range(21,30), range(21,30)) ]; $return = []; foreach($source as $data) { $return = array_merge($return, $data); } $filter = function ($value, $key) { return ($value > 25); }; $return = array_filter($return, $filter, ARRAY_FILTER_USE_BOTH); var_dump($return);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 42, Position 2 = 49
Branch analysis from position: 42
2 jumps found. (Code = 78) Position 1 = 43, Position 2 = 49
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
filename:       /in/NKOGY
function name:  (null)
number of ops:  62
compiled vars:  !0 = $source, !1 = $return, !2 = $data, !3 = $filter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'array_combine'
          1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        INIT_FCALL                                               'range'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 10
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        INIT_ARRAY                                       ~7      $6
    5    13        INIT_FCALL                                               'array_combine'
         14        INIT_FCALL                                               'range'
         15        SEND_VAL                                                 11
         16        SEND_VAL                                                 20
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        INIT_FCALL                                               'range'
         20        SEND_VAL                                                 11
         21        SEND_VAL                                                 20
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
         24        DO_ICALL                                         $10     
         25        ADD_ARRAY_ELEMENT                                ~7      $10
    6    26        INIT_FCALL                                               'array_combine'
         27        INIT_FCALL                                               'range'
         28        SEND_VAL                                                 21
         29        SEND_VAL                                                 30
         30        DO_ICALL                                         $11     
         31        SEND_VAR                                                 $11
         32        INIT_FCALL                                               'range'
         33        SEND_VAL                                                 21
         34        SEND_VAL                                                 30
         35        DO_ICALL                                         $12     
         36        SEND_VAR                                                 $12
         37        DO_ICALL                                         $13     
         38        ADD_ARRAY_ELEMENT                                ~7      $13
    3    39        ASSIGN                                                   !0, ~7
    9    40        ASSIGN                                                   !1, <array>
   11    41      > FE_RESET_R                                       $16     !0, ->49
         42    > > FE_FETCH_R                                               $16, !2, ->49
   12    43    >   INIT_FCALL                                               'array_merge'
         44        SEND_VAR                                                 !1
         45        SEND_VAR                                                 !2
         46        DO_ICALL                                         $17     
         47        ASSIGN                                                   !1, $17
   11    48      > JMP                                                      ->42
         49    >   FE_FREE                                                  $16
   15    50        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNKOGY%3A15%240'
         51        ASSIGN                                                   !3, ~19
   19    52        INIT_FCALL                                               'array_filter'
         53        SEND_VAR                                                 !1
         54        SEND_VAR                                                 !3
         55        SEND_VAL                                                 1
         56        DO_ICALL                                         $21     
         57        ASSIGN                                                   !1, $21
   21    58        INIT_FCALL                                               'var_dump'
         59        SEND_VAR                                                 !1
         60        DO_ICALL                                                 
         61      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNKOGY%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NKOGY
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        IS_SMALLER                                       ~2      25, !0
          3      > RETURN                                                   ~2
   17     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNKOGY%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.09 ms | 945 KiB | 24 Q