3v4l.org

run code in 300+ 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 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 2
Branch analysis from position: 28
Branch analysis from position: 2
Branch analysis from position: 25
filename:       /in/9O00V
function name:  (null)
number of ops:  29
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->25
    5     2    >   INIT_FCALL                                               'rand'
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 20
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    6     7        INIT_FCALL                                               'in_array'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        BOOL_NOT                                         ~6      $5
         12      > JMPZ                                                     ~6, ->25
    7    13    >   ASSIGN_DIM                                               !0
         14        OP_DATA                                                  !1
    8    15        MOD                                              ~8      !1, 2
         16        IS_IDENTICAL                                             ~8, 0
         17      > JMPZ                                                     ~9, ->22
    9    18    >   NOP                                                      
         19        FAST_CONCAT                                      ~10     !1, '+is+even+%0A'
         20        ECHO                                                     ~10
    8    21      > JMP                                                      ->25
   11    22    >   NOP                                                      
         23        FAST_CONCAT                                      ~11     !1, '+is+odd+%0A'
         24        ECHO                                                     ~11
    4    25    >   COUNT                                            ~12     !0
         26        IS_SMALLER                                               ~12, 10
         27      > JMPNZ                                                    ~13, ->2
   14    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.86 ms | 1004 KiB | 15 Q