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[] = $first + $value; } } var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 2
Branch analysis from position: 16
Branch analysis from position: 2
Branch analysis from position: 12
filename:       /in/140P4
function name:  (null)
number of ops:  20
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                                                      ->13
    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, ->12
          7    > > FE_FETCH_R                                               $7, !2, ->12
    7     8    >   ADD                                              ~9      !1, !2
          9        ASSIGN_DIM                                               !3
         10        OP_DATA                                                  ~9
    6    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $7
    4    13    >   COUNT                                            ~10     !0
         14        IS_SMALLER                                               0, ~10
         15      > JMPNZ                                                    ~11, ->2
   11    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.12 ms | 1395 KiB | 17 Q