3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.28 ms | 1401 KiB | 17 Q