3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); while(count($array) > 0){ $first = array_shift($array); foreach($array as $value){ $result[] = $array[0] + $value; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 2
Branch analysis from position: 17
Branch analysis from position: 2
Branch analysis from position: 13
filename:       /in/KHjQ1
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $first, !2 = $value, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->14
    5     2    >   INIT_FCALL                                               'array_shift'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    6     6      > FE_RESET_R                                       $7      !0, ->13
          7    > > FE_FETCH_R                                               $7, !2, ->13
    7     8    >   FETCH_DIM_R                                      ~9      !0, 0
          9        ADD                                              ~10     ~9, !2
         10        ASSIGN_DIM                                               !3
         11        OP_DATA                                                  ~10
    6    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $7
    4    14    >   COUNT                                            ~11     !0
         15        IS_SMALLER                                               0, ~11
         16      > JMPNZ                                                    ~12, ->2
    9    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.39 ms | 1399 KiB | 15 Q