3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 358020; $new_array = array('a'=>0,'b'=>0,'c'=>0,'d'=>0); $blocks = array('a'=>20,'b'=>1000,'c'=>10000,'d'=>50000); foreach($blocks as $key => $val){ $rem = $value % $val; $new_array[$key] = $rem; } print_r($new_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/ag2S6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $value, !1 = $new_array, !2 = $blocks, !3 = $val, !4 = $key, !5 = $rem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 358020
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3      > FE_RESET_R                                       $9      !2, ->11
          4    > > FE_FETCH_R                                       ~10     $9, !3, ->11
          5    >   ASSIGN                                                   !4, ~10
    7     6        MOD                                              ~12     !0, !3
          7        ASSIGN                                                   !5, ~12
    8     8        ASSIGN_DIM                                               !1, !4
          9        OP_DATA                                                  !5
    6    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $9
   11    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.64 ms | 1395 KiB | 15 Q