3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = new ArrayIterator(array(1)); var_dump($arr->current()); $iter = new LimitIterator($arr, 0, 1); iterator_to_array($iter); var_dump($arr->current());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bbefY
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arr, !1 = $iter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'current'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
    5     9        NEW                                              $7      'LimitIterator'
         10        SEND_VAR_EX                                              !0
         11        SEND_VAL_EX                                              0
         12        SEND_VAL_EX                                              1
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $7
    6    15        INIT_FCALL                                               'iterator_to_array'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
    7    18        INIT_FCALL                                               'var_dump'
         19        INIT_METHOD_CALL                                         !0, 'current'
         20        DO_FCALL                                      0  $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.91 ms | 1395 KiB | 17 Q