3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ array_combine(range(1,10), range(1,10)), array_combine(range(11,20), range(11,20)), array_combine(range(21,30), range(21,30)) ]; $data = new stdClass(); $data->data = []; $filter = function ($value) { return ($key < 25); }; var_dump(array_filter($array, $filter));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZM0Al
function name:  (null)
number of ops:  55
compiled vars:  !0 = $array, !1 = $data, !2 = $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                                         $3      
          5        SEND_VAR                                                 $3
          6        INIT_FCALL                                               'range'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 10
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        INIT_ARRAY                                       ~6      $5
    5    13        INIT_FCALL                                               'array_combine'
         14        INIT_FCALL                                               'range'
         15        SEND_VAL                                                 11
         16        SEND_VAL                                                 20
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        INIT_FCALL                                               'range'
         20        SEND_VAL                                                 11
         21        SEND_VAL                                                 20
         22        DO_ICALL                                         $8      
         23        SEND_VAR                                                 $8
         24        DO_ICALL                                         $9      
         25        ADD_ARRAY_ELEMENT                                ~6      $9
    6    26        INIT_FCALL                                               'array_combine'
         27        INIT_FCALL                                               'range'
         28        SEND_VAL                                                 21
         29        SEND_VAL                                                 30
         30        DO_ICALL                                         $10     
         31        SEND_VAR                                                 $10
         32        INIT_FCALL                                               'range'
         33        SEND_VAL                                                 21
         34        SEND_VAL                                                 30
         35        DO_ICALL                                         $11     
         36        SEND_VAR                                                 $11
         37        DO_ICALL                                         $12     
         38        ADD_ARRAY_ELEMENT                                ~6      $12
    3    39        ASSIGN                                                   !0, ~6
    8    40        NEW                                              $14     'stdClass'
         41        DO_FCALL                                      0          
         42        ASSIGN                                                   !1, $14
    9    43        ASSIGN_OBJ                                               !1, 'data'
         44        OP_DATA                                                  <array>
   11    45        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FZM0Al%3A11%240'
         46        ASSIGN                                                   !2, ~18
   14    47        INIT_FCALL                                               'var_dump'
         48        INIT_FCALL                                               'array_filter'
         49        SEND_VAR                                                 !0
         50        SEND_VAR                                                 !2
         51        DO_ICALL                                         $20     
         52        SEND_VAR                                                 $20
         53        DO_ICALL                                                 
         54      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FZM0Al%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.23 ms | 1400 KiB | 21 Q