3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1=>1, 0=>0); for ($i=0; $i<count($a); $i++) { print $i . " : ". $a[$i] . "\n"; } foreach ($a as $i => $v) { print $i . " : ". $v . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/4dO2E
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $i, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
    4     3    >   CONCAT                                           ~5      !1, '+%3A+'
          4        FETCH_DIM_R                                      ~6      !0, !1
          5        CONCAT                                           ~7      ~5, ~6
          6        CONCAT                                           ~8      ~7, '%0A'
          7        ECHO                                                     ~8
    3     8        PRE_INC                                                  !1
          9    >   COUNT                                            ~10     !0
         10        IS_SMALLER                                               !1, ~10
         11      > JMPNZ                                                    ~11, ->3
    7    12    > > FE_RESET_R                                       $12     !0, ->20
         13    > > FE_FETCH_R                                       ~13     $12, !2, ->20
         14    >   ASSIGN                                                   !1, ~13
    8    15        CONCAT                                           ~15     !1, '+%3A+'
         16        CONCAT                                           ~16     ~15, !2
         17        CONCAT                                           ~17     ~16, '%0A'
         18        ECHO                                                     ~17
    7    19      > JMP                                                      ->13
         20    >   FE_FREE                                                  $12
    9    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.03 ms | 1394 KiB | 13 Q