3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('ça', 'ne', 'marche', 'pas'); foreach($array as $key => $value) { // sur les elements pairs if ($key % 2 == 0) { // on efface la prochaine clef unset($array[$key+1]); } echo $value." "; } echo "\n"; $array = array('ça', 'ne', 'marche', 'pas'); foreach($array as $key => &$value) { // sur les elements pairs if ($key % 2 == 0) { // on efface la prochaine clef unset($array[$key+1]); } echo $value." "; } unset($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/QKlv3
function name:  (null)
number of ops:  29
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
    7     4        MOD                                              ~7      !2, 2
          5        IS_EQUAL                                                 ~7, 0
          6      > JMPZ                                                     ~8, ->9
   10     7    >   ADD                                              ~9      !2, 1
          8        UNSET_DIM                                                !0, ~9
   12     9    >   CONCAT                                           ~10     !1, '+'
         10        ECHO                                                     ~10
    4    11      > JMP                                                      ->2
         12    >   FE_FREE                                                  $4
   15    13        ECHO                                                     '%0A'
   17    14        ASSIGN                                                   !0, <array>
   18    15      > FE_RESET_RW                                      $12     !0, ->26
         16    > > FE_FETCH_RW                                      ~13     $12, !1, ->26
         17    >   ASSIGN                                                   !2, ~13
   21    18        MOD                                              ~15     !2, 2
         19        IS_EQUAL                                                 ~15, 0
         20      > JMPZ                                                     ~16, ->23
   24    21    >   ADD                                              ~17     !2, 1
         22        UNSET_DIM                                                !0, ~17
   26    23    >   CONCAT                                           ~18     !1, '+'
         24        ECHO                                                     ~18
   18    25      > JMP                                                      ->16
         26    >   FE_FREE                                                  $12
   28    27        UNSET_CV                                                 !1
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.17 ms | 1399 KiB | 13 Q