3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rng1step = 3; $rng2step = 2; $max = 1000; $find = 553; $rng = range(1,$max); $i = 1; $range2=[]; While(count($rng)){ If($i){ $range1= array_merge($range1, array_splice($rng, 0, $rng1step)); $i = 0; }Else{ $range2= array_merge($range2, array_splice($rng, 0, $rng2step)); $i = 1; } } If(in_array($range1, $find)) echo "range1";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 12
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 44
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 12
Branch analysis from position: 38
Branch analysis from position: 12
filename:       /in/dmKN2
function name:  (null)
number of ops:  45
compiled vars:  !0 = $rng1step, !1 = $rng2step, !2 = $max, !3 = $find, !4 = $rng, !5 = $i, !6 = $range2, !7 = $range1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 3
    4     1        ASSIGN                                                   !1, 2
    5     2        ASSIGN                                                   !2, 1000
    7     3        ASSIGN                                                   !3, 553
    9     4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $12     
          8        ASSIGN                                                   !4, $12
   11     9        ASSIGN                                                   !5, 1
   12    10        ASSIGN                                                   !6, <array>
   13    11      > JMP                                                      ->36
   14    12    > > JMPZ                                                     !5, ->25
   15    13    >   INIT_FCALL                                               'array_merge'
         14        SEND_VAR                                                 !7
         15        INIT_FCALL                                               'array_splice'
         16        SEND_REF                                                 !4
         17        SEND_VAL                                                 0
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $16     
         20        SEND_VAR                                                 $16
         21        DO_ICALL                                         $17     
         22        ASSIGN                                                   !7, $17
   16    23        ASSIGN                                                   !5, 0
         24      > JMP                                                      ->36
   18    25    >   INIT_FCALL                                               'array_merge'
         26        SEND_VAR                                                 !6
         27        INIT_FCALL                                               'array_splice'
         28        SEND_REF                                                 !4
         29        SEND_VAL                                                 0
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $20     
         32        SEND_VAR                                                 $20
         33        DO_ICALL                                         $21     
         34        ASSIGN                                                   !6, $21
   19    35        ASSIGN                                                   !5, 1
   13    36    >   COUNT                                            ~24     !4
         37      > JMPNZ                                                    ~24, ->12
   24    38    >   INIT_FCALL                                               'in_array'
         39        SEND_VAR                                                 !7
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                         $25     
         42      > JMPZ                                                     $25, ->44
         43    >   ECHO                                                     'range1'
         44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.83 ms | 1400 KiB | 21 Q