3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 358020; $new_array = array(); $blocks = array('a'=>20,'b'=>1000,'c'=>10000,'d'=>5000); foreach($blocks as $key => $val){ $rem = $val % $value; array_push($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 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/XRpd8
function name:  (null)
number of ops:  19
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, ->14
          4    > > FE_FETCH_R                                       ~10     $9, !3, ->14
          5    >   ASSIGN                                                   !4, ~10
    7     6        MOD                                              ~12     !3, !0
          7        ASSIGN                                                   !5, ~12
    8     8        INIT_FCALL                                               'array_push'
          9        SEND_REF                                                 !1
         10        SEND_VAR                                                 !4
         11        SEND_VAR                                                 !5
         12        DO_ICALL                                                 
    6    13      > JMP                                                      ->4
         14    >   FE_FREE                                                  $9
   11    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.66 ms | 1386 KiB | 17 Q