3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$arr = array(1 => 'b', 0 => 'a'); $arr = array(1 => 'b'); $arr[0] = 'a'; function t ($arr) { foreach ($arr as $k => $v) { echo $k . ' ' . $v . PHP_EOL; } } t($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nXDXf
function name:  (null)
number of ops:  7
compiled vars:  !0 = $arr
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'
   13     3        INIT_FCALL                                               't'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function t:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/nXDXf
function name:  t
number of ops:  11
compiled vars:  !0 = $arr, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > FE_RESET_R                                       $3      !0, ->9
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->9
          3    >   ASSIGN                                                   !2, ~4
    9     4        CONCAT                                           ~6      !2, '+'
          5        CONCAT                                           ~7      ~6, !1
          6        CONCAT                                           ~8      ~7, '%0A'
          7        ECHO                                                     ~8
    8     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $3
   11    10      > RETURN                                                   null

End of function t

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.33 ms | 1398 KiB | 14 Q