3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = []; $foo2 = ['a']; $foo3 = [false]; $foo4 = [1,2,3,4,5,6,7,8,9]; $arrays = [$foo, $foo2, $foo3, $foo4]; $c = 0; for ($i = 0; $i < 10000000; ++$i) { if ($arrays[$i % 4] === []) { ++$c; } } echo $c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 12
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 12
Branch analysis from position: 20
Branch analysis from position: 12
Branch analysis from position: 17
filename:       /in/2qHoa
function name:  (null)
number of ops:  22
compiled vars:  !0 = $foo, !1 = $foo2, !2 = $foo3, !3 = $foo4, !4 = $arrays, !5 = $c, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, <array>
    7     4        INIT_ARRAY                                       ~11     !0
          5        ADD_ARRAY_ELEMENT                                ~11     !1
          6        ADD_ARRAY_ELEMENT                                ~11     !2
          7        ADD_ARRAY_ELEMENT                                ~11     !3
          8        ASSIGN                                                   !4, ~11
    9     9        ASSIGN                                                   !5, 0
   10    10        ASSIGN                                                   !6, 0
         11      > JMP                                                      ->18
   11    12    >   MOD                                              ~15     !6, 4
         13        FETCH_DIM_R                                      ~16     !4, ~15
         14        IS_IDENTICAL                                             ~16, <array>
         15      > JMPZ                                                     ~17, ->17
   12    16    >   PRE_INC                                                  !5
   10    17    >   PRE_INC                                                  !6
         18    >   IS_SMALLER                                               !6, 10000000
         19      > JMPNZ                                                    ~20, ->12
   16    20    >   ECHO                                                     !5
   17    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.71 ms | 1429 KiB | 13 Q