3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array(); $iterator = new \ArrayIterator(); foreach($values as $value) { $iterator->append($value); } var_dump(iterator_to_array($iterator));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/n8qjR
function name:  (null)
number of ops:  18
compiled vars:  !0 = $values, !1 = $iterator, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        NEW                                              $4      'ArrayIterator'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    7     4      > FE_RESET_R                                       $7      !0, ->10
          5    > > FE_FETCH_R                                               $7, !2, ->10
   10     6    >   INIT_METHOD_CALL                                         !1, 'append'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
    7     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $7
   13    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'iterator_to_array'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.67 ms | 1395 KiB | 17 Q