3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$arr = array(1 => 'b', 0 => 'a'); $arr = array(1 => 'b'); $arr[0] = 'a'; foreach ($arr as $k => $v) { echo $k . ' ' . $v . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/D3cBS
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  'a'
    7     3      > FE_RESET_R                                       $5      !0, ->11
          4    > > FE_FETCH_R                                       ~6      $5, !1, ->11
          5    >   ASSIGN                                                   !2, ~6
    8     6        CONCAT                                           ~8      !2, '+'
          7        CONCAT                                           ~9      ~8, !1
          8        CONCAT                                           ~10     ~9, '%0A'
          9        ECHO                                                     ~10
    7    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $5
    9    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.29 ms | 1393 KiB | 13 Q