3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; // menghitung loop $j = 0; // key untuk $data $contoh = range(0, 11); foreach($contoh as $c) { $temp[$i] = $c; $i++; if( ($i % 3) == 0) { $data[$j] = $temp[$i]; $j++; } } print_r($temp); print_r($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/9gWUk
function name:  (null)
number of ops:  28
compiled vars:  !0 = $i, !1 = $j, !2 = $contoh, !3 = $c, !4 = $temp, !5 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, 0
    5     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 11
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
    7     7      > FE_RESET_R                                       $10     !2, ->20
          8    > > FE_FETCH_R                                               $10, !3, ->20
    9     9    >   ASSIGN_DIM                                               !4, !0
         10        OP_DATA                                                  !3
   10    11        PRE_INC                                                  !0
   12    12        MOD                                              ~13     !0, 3
         13        IS_EQUAL                                                 ~13, 0
         14      > JMPZ                                                     ~14, ->19
   13    15    >   FETCH_DIM_R                                      ~16     !4, !0
         16        ASSIGN_DIM                                               !5, !1
         17        OP_DATA                                                  ~16
   14    18        PRE_INC                                                  !1
    7    19    > > JMP                                                      ->8
         20    >   FE_FREE                                                  $10
   19    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                                 
   20    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !5
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.51 ms | 942 KiB | 18 Q