3v4l.org

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

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.45 ms | 1395 KiB | 15 Q