3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("a","b","c"); $counter = 0; $status = array();$status = array_fill(0, count($arr), 0); foreach($arr as $a){ $status[$counter] += 10; $status[$counter] += 20; $status[$counter] += 20; echo $status[$counter]."<br>"; $counter ++; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 23
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 23
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/TLWcQ
function name:  (null)
number of ops:  25
compiled vars:  !0 = $arr, !1 = $counter, !2 = $status, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
    4     2        ASSIGN                                                   !2, <array>
          3        INIT_FCALL                                               'array_fill'
          4        SEND_VAL                                                 0
          5        COUNT                                            ~7      !0
          6        SEND_VAL                                                 ~7
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
    7    10      > FE_RESET_R                                       $10     !0, ->23
         11    > > FE_FETCH_R                                               $10, !3, ->23
    8    12    >   ASSIGN_DIM_OP                +=               1          !2, !1
         13        OP_DATA                                                  10
    9    14        ASSIGN_DIM_OP                +=               1          !2, !1
         15        OP_DATA                                                  20
   10    16        ASSIGN_DIM_OP                +=               1          !2, !1
         17        OP_DATA                                                  20
   11    18        FETCH_DIM_R                                      ~14     !2, !1
         19        CONCAT                                           ~15     ~14, '%3Cbr%3E'
         20        ECHO                                                     ~15
   12    21        PRE_INC                                                  !1
    7    22      > JMP                                                      ->11
         23    >   FE_FREE                                                  $10
   13    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.87 ms | 1395 KiB | 15 Q