3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('ça', 'ne', 'marche', 'pas'); foreach($array as $key => $value) { if ($key % 1 == 1) unset($array[++$key]); echo $value." "; } echo "\n"; $array = array('ça', 'ne', 'marche', 'pas'); foreach($array as $key => &$value) { if ($key % 1 == 1) unset($array[++$key]); echo $value." "; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
Branch analysis from position: 12
2 jumps found. (Code = 125) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
2 jumps found. (Code = 126) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 23
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 12
filename:       /in/VT61k
function name:  (null)
number of ops:  28
compiled vars:  !0 = $array, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->12
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->12
          3    >   ASSIGN                                                   !2, ~5
    6     4        MOD                                              ~7      !2, 1
          5        IS_EQUAL                                                 ~7, 1
          6      > JMPZ                                                     ~8, ->9
          7    >   PRE_INC                                          ~9      !2
          8        UNSET_DIM                                                !0, ~9
    7     9    >   CONCAT                                           ~10     !1, '+'
         10        ECHO                                                     ~10
    4    11      > JMP                                                      ->2
         12    >   FE_FREE                                                  $4
   10    13        ECHO                                                     '%0A'
   12    14        ASSIGN                                                   !0, <array>
   13    15      > FE_RESET_RW                                      $12     !0, ->26
         16    > > FE_FETCH_RW                                      ~13     $12, !1, ->26
         17    >   ASSIGN                                                   !2, ~13
   15    18        MOD                                              ~15     !2, 1
         19        IS_EQUAL                                                 ~15, 1
         20      > JMPZ                                                     ~16, ->23
         21    >   PRE_INC                                          ~17     !2
         22        UNSET_DIM                                                !0, ~17
   16    23    >   CONCAT                                           ~18     !1, '+'
         24        ECHO                                                     ~18
   13    25      > JMP                                                      ->16
         26    >   FE_FREE                                                  $12
   17    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.54 ms | 1386 KiB | 13 Q