3v4l.org

run code in 300+ PHP versions simultaneously
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 16
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 29
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 42
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
2 jumps found. (Code = 44) Position 1 = 65, Position 2 = 55
Branch analysis from position: 65
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
2 jumps found. (Code = 44) Position 1 = 79, Position 2 = 68
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 94
Branch analysis from position: 94
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 82
Branch analysis from position: 96
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 82
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 82
Branch analysis from position: 96
Branch analysis from position: 82
Branch analysis from position: 68
2 jumps found. (Code = 44) Position 1 = 79, Position 2 = 68
Branch analysis from position: 79
Branch analysis from position: 68
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 65, Position 2 = 55
Branch analysis from position: 65
Branch analysis from position: 55
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 42
Branch analysis from position: 52
Branch analysis from position: 42
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 29
Branch analysis from position: 39
Branch analysis from position: 29
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 16
Branch analysis from position: 26
Branch analysis from position: 16
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/3OCkc
function name:  (null)
number of ops:  97
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ECHO                                                     '4+unique+and+2+repetitive+digits.%0A'
   24     1        ASSIGN                                                   !0, 0
          2      > JMP                                                      ->11
   25     3    >   INIT_FCALL                                               'random_number_with_dupe'
          4        SEND_VAL                                                 6
          5        SEND_VAL                                                 2
          6        SEND_VAL                                                 <true>
          7        DO_FCALL                                      0  $2      
          8        CONCAT                                           ~3      $2, '%0A'
          9        ECHO                                                     ~3
   24    10        PRE_INC                                                  !0
         11    >   IS_SMALLER                                               !0, 5
         12      > JMPNZ                                                    ~5, ->3
   36    13    >   ECHO                                                     '3+unique+and+3+repetitive+digits.%0A'
   37    14        ASSIGN                                                   !0, 0
         15      > JMP                                                      ->24
   38    16    >   INIT_FCALL                                               'random_number_with_dupe'
         17        SEND_VAL                                                 6
         18        SEND_VAL                                                 3
         19        SEND_VAL                                                 <true>
         20        DO_FCALL                                      0  $7      
         21        CONCAT                                           ~8      $7, '%0A'
         22        ECHO                                                     ~8
   37    23        PRE_INC                                                  !0
         24    >   IS_SMALLER                                               !0, 5
         25      > JMPNZ                                                    ~10, ->16
   49    26    >   ECHO                                                     '2+unique+and+4+repetitive+digits.%0A'
   50    27        ASSIGN                                                   !0, 0
         28      > JMP                                                      ->37
   51    29    >   INIT_FCALL                                               'random_number_with_dupe'
         30        SEND_VAL                                                 6
         31        SEND_VAL                                                 4
         32        SEND_VAL                                                 <true>
         33        DO_FCALL                                      0  $12     
         34        CONCAT                                           ~13     $12, '%0A'
         35        ECHO                                                     ~13
   50    36        PRE_INC                                                  !0
         37    >   IS_SMALLER                                               !0, 5
         38      > JMPNZ                                                    ~15, ->29
   62    39    >   ECHO                                                     '1+unique+and+5+repetitive+digits.%0A'
   63    40        ASSIGN                                                   !0, 0
         41      > JMP                                                      ->50
   64    42    >   INIT_FCALL                                               'random_number_with_dupe'
         43        SEND_VAL                                                 6
         44        SEND_VAL                                                 5
         45        SEND_VAL                                                 <true>
         46        DO_FCALL                                      0  $17     
         47        CONCAT                                           ~18     $17, '%0A'
         48        ECHO                                                     ~18
   63    49        PRE_INC                                                  !0
         50    >   IS_SMALLER                                               !0, 5
         51      > JMPNZ                                                    ~20, ->42
   75    52    >   ECHO                                                     '0+unique+and+6+repetitive+digits.%0A'
   76    53        ASSIGN                                                   !0, 0
         54      > JMP                                                      ->63
   77    55    >   INIT_FCALL                                               'random_number_with_dupe'
         56        SEND_VAL                                                 6
         57        SEND_VAL                                                 6
         58        SEND_VAL                                                 <true>
         59        DO_FCALL                                      0  $22     
         60        CONCAT                                           ~23     $22, '%0A'
         61        ECHO                                                     ~23
   76    62        PRE_INC                                                  !0
         63    >   IS_SMALLER                                               !0, 5
         64      > JMPNZ                                                    ~25, ->55
   88    65    >   ECHO                                                     'All+rules.%0A'
   89    66        ASSIGN                                                   !0, 0
         67      > JMP                                                      ->77
   90    68    >   INIT_FCALL                                               'random_number_with_dupe'
         69        SEND_VAL                                                 6
         70        ADD                                              ~27     !0, 1
         71        SEND_VAL                                                 ~27
         72        SEND_VAL                                                 <true>
         73        DO_FCALL                                      0  $28     
         74        CONCAT                                           ~29     $28, '%0A'
         75        ECHO                                                     ~29
   89    76        PRE_INC                                                  !0
         77    >   IS_SMALLER                                               !0, 6
         78      > JMPNZ                                                    ~31, ->68
  102    79    >   ECHO                                                     'All+rules+%28random%29.%0A'
  103    80        ASSIGN                                                   !0, 0
         81      > JMP                                                      ->94
  104    82    >   INIT_FCALL                                               'random_number_with_dupe'
         83        SEND_VAL                                                 6
         84        INIT_FCALL                                               'mt_rand'
         85        SEND_VAL                                                 1
         86        SEND_VAL                                                 6
         87        DO_ICALL                                         $33     
         88        SEND_VAR                                                 $33
         89        SEND_VAL                                                 <true>
         90        DO_FCALL                                      0  $34     
         91        CONCAT                                           ~35     $34, '%0A'
         92        ECHO                                                     ~35
  103    93        PRE_INC                                                  !0
         94    >   IS_SMALLER                                               !0, 6
         95      > JMPNZ                                                    ~37, ->82
  114    96    > > RETURN                                                   1

Function random_number_with_dupe:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 35
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 28
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 39
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 28
Branch analysis from position: 35
Branch analysis from position: 28
Branch analysis from position: 35
filename:       /in/3OCkc
function name:  random_number_with_dupe
number of ops:  45
compiled vars:  !0 = $len, !1 = $dup, !2 = $sort, !3 = $num, !4 = $k, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      6
          1        RECV_INIT                                        !1      1
          2        RECV_INIT                                        !2      <false>
    4     3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 9
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !3, $6
    5     8        INIT_FCALL                                               'shuffle'
          9        SEND_REF                                                 !3
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'array_slice'
         12        SEND_VAR                                                 !3
         13        SEND_VAL                                                 0
         14        SUB                                              ~9      !0, !1
         15        ADD                                              ~10     ~9, 1
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !3, $11
    9    19        IS_SMALLER                                               0, !1
         20      > JMPZ                                                     ~13, ->35
   10    21    >   INIT_FCALL                                               'array_rand'
         22        SEND_VAR                                                 !3
         23        SEND_VAL                                                 1
         24        DO_ICALL                                         $14     
         25        ASSIGN                                                   !4, $14
   11    26        ASSIGN                                                   !5, 0
         27      > JMP                                                      ->32
   12    28    >   FETCH_DIM_R                                      ~18     !3, !4
         29        ASSIGN_DIM                                               !3
         30        OP_DATA                                                  ~18
   11    31        PRE_INC                                                  !5
         32    >   SUB                                              ~20     !1, 1
         33        IS_SMALLER                                               !5, ~20
         34      > JMPNZ                                                    ~21, ->28
   16    35    > > JMPZ                                                     !2, ->39
   17    36    >   INIT_FCALL                                               'sort'
         37        SEND_REF                                                 !3
         38        DO_ICALL                                                 
   20    39    >   INIT_FCALL                                               'implode'
         40        SEND_VAL                                                 ''
         41        SEND_VAR                                                 !3
         42        DO_ICALL                                         $23     
         43      > RETURN                                                   $23
   21    44*     > RETURN                                                   null

End of function random_number_with_dupe

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.02 ms | 991 KiB | 27 Q