3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(10); reset($array); for ($i = 1; $i <= 60; $i++) { $array[] = current($array) + 1; next($array); } var_dumo(array_sum($array), $array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
Branch analysis from position: 6
filename:       /in/Echil
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'reset'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    7     4        ASSIGN                                                   !1, 1
          5      > JMP                                                      ->16
    8     6    >   INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ADD                                              ~7      $6, 1
         10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  ~7
    9    12        INIT_FCALL                                               'next'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                                 
    7    15        PRE_INC                                                  !1
         16    >   IS_SMALLER_OR_EQUAL                                      !1, 60
         17      > JMPNZ                                                    ~10, ->6
   11    18    >   INIT_FCALL_BY_NAME                                       'var_dumo'
         19        INIT_FCALL                                               'array_sum'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $11     
         22        SEND_VAR_NO_REF_EX                                       $11
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0          
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.18 ms | 1395 KiB | 21 Q