3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oldArray = range('a','e'); $newArray = array(); $len = count($oldArray); for($i = 0; $i < count($oldArray); $i+=2){ $key = $oldArray[$i]; $val = $i+1 < $len ? $oldArray[$i+1] : ''; $newArray[$key] = $val; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
Branch analysis from position: 10
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
Branch analysis from position: 10
filename:       /in/SSEbL
function name:  (null)
number of ops:  28
compiled vars:  !0 = $oldArray, !1 = $newArray, !2 = $len, !3 = $i, !4 = $key, !5 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 'e'
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    6     5        ASSIGN                                                   !1, <array>
    8     6        COUNT                                            ~9      !0
          7        ASSIGN                                                   !2, ~9
    9     8        ASSIGN                                                   !3, 0
          9      > JMP                                                      ->24
   10    10    >   FETCH_DIM_R                                      ~12     !0, !3
         11        ASSIGN                                                   !4, ~12
   11    12        ADD                                              ~14     !3, 1
         13        IS_SMALLER                                               ~14, !2
         14      > JMPZ                                                     ~15, ->19
         15    >   ADD                                              ~16     !3, 1
         16        FETCH_DIM_R                                      ~17     !0, ~16
         17        QM_ASSIGN                                        ~18     ~17
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~18     ''
         20    >   ASSIGN                                                   !5, ~18
   13    21        ASSIGN_DIM                                               !1, !4
         22        OP_DATA                                                  !5
    9    23        ASSIGN_OP                                     1          !3, 2
         24    >   COUNT                                            ~22     !0
         25        IS_SMALLER                                               !3, ~22
         26      > JMPNZ                                                    ~23, ->10
   14    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.41 ms | 1396 KiB | 15 Q