3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chars = array(0,1,2,3,4,5,6,7,8,9); $serial = ''; $max = count($chars)-1; for($i=0;$i<20;$i++){ $serial .= (!($i % 5) && $i ? '-' : '').$chars[rand(0, $max)]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 7
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 7
Branch analysis from position: 25
Branch analysis from position: 7
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 7
Branch analysis from position: 25
Branch analysis from position: 7
Branch analysis from position: 11
filename:       /in/v80pc
function name:  (null)
number of ops:  26
compiled vars:  !0 = $chars, !1 = $serial, !2 = $max, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, ''
    4     2        COUNT                                            ~6      !0
          3        SUB                                              ~7      ~6, 1
          4        ASSIGN                                                   !2, ~7
    5     5        ASSIGN                                                   !3, 0
          6      > JMP                                                      ->23
    6     7    >   MOD                                              ~10     !3, 5
          8        BOOL_NOT                                         ~11     ~10
          9      > JMPZ_EX                                          ~11     ~11, ->11
         10    >   BOOL                                             ~11     !3
         11    > > JMPZ                                                     ~11, ->14
         12    >   QM_ASSIGN                                        ~12     '-'
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~12     ''
         15    >   INIT_FCALL                                               'rand'
         16        SEND_VAL                                                 0
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $13     
         19        FETCH_DIM_R                                      ~14     !0, $13
         20        CONCAT                                           ~15     ~12, ~14
         21        ASSIGN_OP                                     8          !1, ~15
    5    22        PRE_INC                                                  !3
         23    >   IS_SMALLER                                               !3, 20
         24      > JMPNZ                                                    ~18, ->7
    7    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.4 ms | 1396 KiB | 15 Q