3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(1, 2, 3, 4, 5); $len=count($x); echo "array[$len]"; foreach($x as $key=>$int) echo "[$key] => $int"; unset($x[3]); $len=count($x); echo "array[$len]"; foreach($x as $key=>$int) echo "[$key] => $int"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 33
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 33
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 16
filename:       /in/MrvWk
function name:  (null)
number of ops:  35
compiled vars:  !0 = $x, !1 = $len, !2 = $int, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        COUNT                                            ~5      !0
          2        ASSIGN                                                   !1, ~5
    4     3        ROPE_INIT                                     3  ~8      'array%5B'
          4        ROPE_ADD                                      1  ~8      ~8, !1
          5        ROPE_END                                      2  ~7      ~8, '%5D'
          6        ECHO                                                     ~7
    5     7      > FE_RESET_R                                       $10     !0, ->16
          8    > > FE_FETCH_R                                       ~11     $10, !2, ->16
          9    >   ASSIGN                                                   !3, ~11
    6    10        ROPE_INIT                                     4  ~14     '%5B'
         11        ROPE_ADD                                      1  ~14     ~14, !3
         12        ROPE_ADD                                      2  ~14     ~14, '%5D+%3D%3E+'
         13        ROPE_END                                      3  ~13     ~14, !2
         14        ECHO                                                     ~13
    5    15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $10
    7    17        UNSET_DIM                                                !0, 3
    8    18        COUNT                                            ~16     !0
         19        ASSIGN                                                   !1, ~16
    9    20        ROPE_INIT                                     3  ~19     'array%5B'
         21        ROPE_ADD                                      1  ~19     ~19, !1
         22        ROPE_END                                      2  ~18     ~19, '%5D'
         23        ECHO                                                     ~18
   10    24      > FE_RESET_R                                       $21     !0, ->33
         25    > > FE_FETCH_R                                       ~22     $21, !2, ->33
         26    >   ASSIGN                                                   !3, ~22
   11    27        ROPE_INIT                                     4  ~25     '%5B'
         28        ROPE_ADD                                      1  ~25     ~25, !3
         29        ROPE_ADD                                      2  ~25     ~25, '%5D+%3D%3E+'
         30        ROPE_END                                      3  ~24     ~25, !2
         31        ECHO                                                     ~24
   10    32      > JMP                                                      ->25
         33    >   FE_FREE                                                  $21
   12    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.93 ms | 1395 KiB | 13 Q