3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.43 ms | 1395 KiB | 15 Q