3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1,2,3,4,5]; for ($i = 0; $i < count($arr); $i++) { $result = $i % 3; echo "$result "; }
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
1 jumps found. (Code = 62) Position 1 = -2
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/WfCqE
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr, !1 = $i, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
    6     3    >   MOD                                              ~5      !1, 3
          4        ASSIGN                                                   !2, ~5
    7     5        NOP                                                      
          6        FAST_CONCAT                                      ~7      !2, '+'
          7        ECHO                                                     ~7
    5     8        PRE_INC                                                  !1
          9    >   COUNT                                            ~9      !0
         10        IS_SMALLER                                               !1, ~9
         11      > JMPNZ                                                    ~10, ->3
    8    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.66 ms | 1393 KiB | 13 Q