3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fieldvalues = array(1,2,3,4,5,6,7,8); foreach($fieldvalues as $key => $value) { echo 'We are looping'; if(!empty($key) && $key % 4 == 0) { echo PHP_EOL. 'Every 4th' . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
Branch analysis from position: 11
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/bG2NS
function name:  (null)
number of ops:  16
compiled vars:  !0 = $fieldvalues, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_R                                       $4      !0, ->14
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->14
          3    >   ASSIGN                                                   !2, ~5
    4     4        ECHO                                                     'We+are+looping'
    5     5        ISSET_ISEMPTY_CV                                 ~7      !2
          6        BOOL_NOT                                         ~8      ~7
          7      > JMPZ_EX                                          ~8      ~8, ->11
          8    >   MOD                                              ~9      !2, 4
          9        IS_EQUAL                                         ~10     ~9, 0
         10        BOOL                                             ~8      ~10
         11    > > JMPZ                                                     ~8, ->13
    6    12    >   ECHO                                                     '%0AEvery+4th%0A'
    3    13    > > JMP                                                      ->2
         14    >   FE_FREE                                                  $4
    8    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.07 ms | 1393 KiB | 13 Q