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 (empty($arrays[$i % 4])) { ++$c; } } echo $c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
Branch analysis from position: 12
Branch analysis from position: 16
filename:       /in/vBDue
function name:  (null)
number of ops:  21
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                                                      ->17
   11    12    >   MOD                                              ~15     !6, 4
         13        ISSET_ISEMPTY_DIM_OBJ                         1          !4, ~15
         14      > JMPZ                                                     ~16, ->16
   12    15    >   PRE_INC                                                  !5
   10    16    >   PRE_INC                                                  !6
         17    >   IS_SMALLER                                               !6, 10000000
         18      > JMPNZ                                                    ~19, ->12
   16    19    >   ECHO                                                     !5
   17    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.02 ms | 1429 KiB | 13 Q