3v4l.org

run code in 300+ PHP versions simultaneously
<?php $top30 = [9,8,7,6,4,3,2,1]; for($i = 0; $i < count($top30); $i++) { if($top30[$i] < 5) { array_splice($top30, $i, 0, 5); } } var_dump($top30); ?>
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 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
Branch analysis from position: 12
filename:       /in/FHFEs
function name:  (null)
number of ops:  20
compiled vars:  !0 = $top30, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->13
    5     3    >   FETCH_DIM_R                                      ~4      !0, !1
          4        IS_SMALLER                                               ~4, 5
          5      > JMPZ                                                     ~5, ->12
    6     6    >   INIT_FCALL                                               'array_splice'
          7        SEND_REF                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 5
         11        DO_ICALL                                                 
    4    12    >   PRE_INC                                                  !1
         13    >   COUNT                                            ~8      !0
         14        IS_SMALLER                                               !1, ~8
         15      > JMPNZ                                                    ~9, ->3
    9    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
   11    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.48 ms | 1386 KiB | 17 Q