3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(iterator_count(new CallbackFilterIterator(new ArrayIterator([1,2,3,4]), function ($i) { return $i % 2 === 0; })));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ai7gS
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'iterator_count'
          2        NEW                                              $0      'CallbackFilterIterator'
          3        NEW                                              $1      'ArrayIterator'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $1
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FAi7gS%3A3%240'
          8        SEND_VAL_EX                                              ~3
          9        DO_FCALL                                      0          
         10        SEND_VAR                                                 $0
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FAi7gS%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.93 ms | 1395 KiB | 17 Q