3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xs = array(3, 4, 5, 7); $xs2 = new ArrayObject($xs); $it = $xs2->getIterator(); $it->rewind(); printf("%d\n", current($it)); printf("%d\n", $it->current()); $it->next(); $it->next(); printf("%d\n", current($it));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cnrKg
function name:  (null)
number of ops:  35
compiled vars:  !0 = $xs, !1 = $xs2, !2 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $4      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    5     5        INIT_METHOD_CALL                                         !1, 'getIterator'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !2, $7
    6     8        INIT_METHOD_CALL                                         !2, 'rewind'
          9        DO_FCALL                                      0          
    7    10        INIT_FCALL                                               'printf'
         11        SEND_VAL                                                 '%25d%0A'
         12        INIT_FCALL                                               'current'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $10     
         15        SEND_VAR                                                 $10
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'printf'
         18        SEND_VAL                                                 '%25d%0A'
         19        INIT_METHOD_CALL                                         !2, 'current'
         20        DO_FCALL                                      0  $12     
         21        SEND_VAR                                                 $12
         22        DO_ICALL                                                 
    9    23        INIT_METHOD_CALL                                         !2, 'next'
         24        DO_FCALL                                      0          
   10    25        INIT_METHOD_CALL                                         !2, 'next'
         26        DO_FCALL                                      0          
   11    27        INIT_FCALL                                               'printf'
         28        SEND_VAL                                                 '%25d%0A'
         29        INIT_FCALL                                               'current'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $16     
         32        SEND_VAR                                                 $16
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.87 ms | 1396 KiB | 17 Q