3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_array = array('jasmina 1', 'kaca 2', 'marija 3', 'mimi 4', 'gaga 5', 'lela 6'); $infArray = array(1, 2, 3); $arrayIterator = new ArrayIterator($infArray); var_dump($arrayIterator->current()); $infiniteIterator = new InfiniteIterator(new ArrayIterator($infArray)); var_dump($infiniteIterator->current()); foreach($test_array as $test){ echo $test . ' ' . $infiniteIterator->current() . '<br/>' . PHP_EOL; $infiniteIterator->next(); } echo phpversion();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 35
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 35
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/ErCa3
function name:  (null)
number of ops:  40
compiled vars:  !0 = $test_array, !1 = $infArray, !2 = $arrayIterator, !3 = $infiniteIterator, !4 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        NEW                                              $7      'ArrayIterator'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $7
    5     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !2, 'current'
          8        DO_FCALL                                      0  $10     
          9        SEND_VAR                                                 $10
         10        DO_ICALL                                                 
    7    11        NEW                                              $12     'InfiniteIterator'
         12        NEW                                              $13     'ArrayIterator'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        SEND_VAR_NO_REF_EX                                       $13
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $12
    8    18        INIT_FCALL                                               'var_dump'
         19        INIT_METHOD_CALL                                         !3, 'current'
         20        DO_FCALL                                      0  $17     
         21        SEND_VAR                                                 $17
         22        DO_ICALL                                                 
   10    23      > FE_RESET_R                                       $19     !0, ->35
         24    > > FE_FETCH_R                                               $19, !4, ->35
   11    25    >   CONCAT                                           ~20     !4, '+'
         26        INIT_METHOD_CALL                                         !3, 'current'
         27        DO_FCALL                                      0  $21     
         28        CONCAT                                           ~22     ~20, $21
         29        CONCAT                                           ~23     ~22, '%3Cbr%2F%3E'
         30        CONCAT                                           ~24     ~23, '%0A'
         31        ECHO                                                     ~24
   12    32        INIT_METHOD_CALL                                         !3, 'next'
         33        DO_FCALL                                      0          
   10    34      > JMP                                                      ->24
         35    >   FE_FREE                                                  $19
   15    36        INIT_FCALL                                               'phpversion'
         37        DO_ICALL                                         $26     
         38        ECHO                                                     $26
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.81 ms | 1392 KiB | 17 Q