3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range(0, 1440); $it = new CallbackFilterIterator( new ArrayIterator($array), function($value, $key) { return 0 === $key % 30; } ); foreach ($it as $value) { var_dump($value); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/msXK3
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $it, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1440
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        NEW                                              $5      'CallbackFilterIterator'
    5     6        NEW                                              $6      'ArrayIterator'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $6
    6    10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FmsXK3%3A6%240'
         11        SEND_VAL_EX                                              ~8
         12        DO_FCALL                                      0          
    4    13        ASSIGN                                                   !1, $5
    9    14      > FE_RESET_R                                       $11     !1, ->20
         15    > > FE_FETCH_R                                               $11, !2, ->20
   10    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
    9    19      > JMP                                                      ->15
         20    >   FE_FREE                                                  $11
   11    21      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FmsXK3%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
206.71 ms | 1396 KiB | 17 Q