3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(1, 2, 3, 4, 5); $len=$x.length; echo "array[$len]"; foreach($x as $key=>$int) echo "[$key] => $int"; unset($x[3]); $len=$x.length; 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 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 35
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 35
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 17
filename:       /in/kn6Sn
function name:  (null)
number of ops:  37
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        FETCH_CONSTANT                                   ~5      'length'
          2        CONCAT                                           ~6      !0, ~5
          3        ASSIGN                                                   !1, ~6
    4     4        ROPE_INIT                                     3  ~9      'array%5B'
          5        ROPE_ADD                                      1  ~9      ~9, !1
          6        ROPE_END                                      2  ~8      ~9, '%5D'
          7        ECHO                                                     ~8
    5     8      > FE_RESET_R                                       $11     !0, ->17
          9    > > FE_FETCH_R                                       ~12     $11, !2, ->17
         10    >   ASSIGN                                                   !3, ~12
    6    11        ROPE_INIT                                     4  ~15     '%5B'
         12        ROPE_ADD                                      1  ~15     ~15, !3
         13        ROPE_ADD                                      2  ~15     ~15, '%5D+%3D%3E+'
         14        ROPE_END                                      3  ~14     ~15, !2
         15        ECHO                                                     ~14
    5    16      > JMP                                                      ->9
         17    >   FE_FREE                                                  $11
    7    18        UNSET_DIM                                                !0, 3
    8    19        FETCH_CONSTANT                                   ~17     'length'
         20        CONCAT                                           ~18     !0, ~17
         21        ASSIGN                                                   !1, ~18
    9    22        ROPE_INIT                                     3  ~21     'array%5B'
         23        ROPE_ADD                                      1  ~21     ~21, !1
         24        ROPE_END                                      2  ~20     ~21, '%5D'
         25        ECHO                                                     ~20
   10    26      > FE_RESET_R                                       $23     !0, ->35
         27    > > FE_FETCH_R                                       ~24     $23, !2, ->35
         28    >   ASSIGN                                                   !3, ~24
   11    29        ROPE_INIT                                     4  ~27     '%5B'
         30        ROPE_ADD                                      1  ~27     ~27, !3
         31        ROPE_ADD                                      2  ~27     ~27, '%5D+%3D%3E+'
         32        ROPE_END                                      3  ~26     ~27, !2
         33        ECHO                                                     ~26
   10    34      > JMP                                                      ->27
         35    >   FE_FREE                                                  $23
   12    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.73 ms | 1399 KiB | 13 Q