3v4l.org

run code in 300+ PHP versions simultaneously
<?php class It extends ArrayIterator { public function current() { printf("current\n"); return parent::current(); } } $i = new It(array(1, 2, 3, 4)); foreach($i as $k => $v) { printf("value: %d\n", $v); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/BWLvv
function name:  (null)
number of ops:  14
compiled vars:  !0 = $i, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'It'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   11     4      > FE_RESET_R                                       $6      !0, ->12
          5    > > FE_FETCH_R                                       ~7      $6, !1, ->12
          6    >   ASSIGN                                                   !2, ~7
   12     7        INIT_FCALL                                               'printf'
          8        SEND_VAL                                                 'value%3A+%25d%0A'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   11    11      > JMP                                                      ->5
         12    >   FE_FREE                                                  $6
   13    13      > RETURN                                                   1

Class It:
Function current:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BWLvv
function name:  current
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'printf'
          1        SEND_VAL                                                 'current%0A'
          2        DO_ICALL                                                 
    5     3        INIT_STATIC_METHOD_CALL                                  'current'
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
    6     6*     > RETURN                                                   null

End of function current

End of class It.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.89 ms | 1387 KiB | 15 Q