3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array(); while (count($array) < 10) { $value = rand(1, 20); if (!in_array($value, $array)) { $array[] = $value; if ($value % 2 === 0) { echo "$value is even \n"; } else { echo "$value is odd \n"; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 22
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 2
Branch analysis from position: 25
Branch analysis from position: 2
Branch analysis from position: 22
filename:       /in/9O00V
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1      > JMP                                                          ->22
    5     2    >   INIT_FCALL                                                   'rand'
          3        SEND_VAL                                                     1
          4        SEND_VAL                                                     20
          5        DO_ICALL                                             $3      
          6        ASSIGN                                                       !1, $3
    6     7        FRAMELESS_ICALL_2                in_array            ~5      !1, !0
          8        BOOL_NOT                                             ~6      ~5
          9      > JMPZ                                                         ~6, ->22
    7    10    >   ASSIGN_DIM                                                   !0
         11        OP_DATA                                                      !1
    8    12        MOD                                                  ~8      !1, 2
         13        IS_IDENTICAL                                                 ~8, 0
         14      > JMPZ                                                         ~9, ->19
    9    15    >   NOP                                                          
         16        FAST_CONCAT                                          ~10     !1, '+is+even+%0A'
         17        ECHO                                                         ~10
    8    18      > JMP                                                          ->22
   11    19    >   NOP                                                          
         20        FAST_CONCAT                                          ~11     !1, '+is+odd+%0A'
         21        ECHO                                                         ~11
    4    22    >   COUNT                                                ~12     !0
         23        IS_SMALLER                                                   ~12, 10
         24      > JMPNZ                                                        ~13, ->2
   14    25    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.98 ms | 2200 KiB | 14 Q