3v4l.org

run code in 300+ PHP versions simultaneously
<?php function multiID($n=32) { for ($x=$s=0,$r=null; $x<$n; $x++) { $c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890'; if (($x<$n) && ($x > 0) && ($s < 2)) { $c .= '-_'; } $g = substr($c, mt_rand(0, strlen($c) - 1), 1); $r .= $g; if (($g == '_') || ($g == '-')) { $s++; } } return $r; } echo multiID(6);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SOT5R
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'multiid'
          1        SEND_VAL                                                 6
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function multiid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 5
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
2 jumps found. (Code = 47) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 5
Branch analysis from position: 37
Branch analysis from position: 5
Branch analysis from position: 34
Branch analysis from position: 32
Branch analysis from position: 15
Branch analysis from position: 13
Branch analysis from position: 10
filename:       /in/SOT5R
function name:  multiID
number of ops:  39
compiled vars:  !0 = $n, !1 = $x, !2 = $s, !3 = $r, !4 = $c, !5 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      32
    4     1        ASSIGN                                           ~6      !2, 0
          2        ASSIGN                                                   !1, ~6
          3        ASSIGN                                                   !3, null
          4      > JMP                                                      ->35
    5     5    >   ASSIGN                                                   !4, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890'
    6     6        IS_SMALLER                                       ~10     !1, !0
          7      > JMPZ_EX                                          ~10     ~10, ->10
          8    >   IS_SMALLER                                       ~11     0, !1
          9        BOOL                                             ~10     ~11
         10    > > JMPZ_EX                                          ~10     ~10, ->13
         11    >   IS_SMALLER                                       ~12     !2, 2
         12        BOOL                                             ~10     ~12
         13    > > JMPZ                                                     ~10, ->15
         14    >   ASSIGN_OP                                     8          !4, '-_'
    7    15    >   INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !4
         17        INIT_FCALL                                               'mt_rand'
         18        SEND_VAL                                                 0
         19        STRLEN                                           ~14     !4
         20        SUB                                              ~15     ~14, 1
         21        SEND_VAL                                                 ~15
         22        DO_ICALL                                         $16     
         23        SEND_VAR                                                 $16
         24        SEND_VAL                                                 1
         25        DO_ICALL                                         $17     
         26        ASSIGN                                                   !5, $17
    8    27        ASSIGN_OP                                     8          !3, !5
    9    28        IS_EQUAL                                         ~20     !5, '_'
         29      > JMPNZ_EX                                         ~20     ~20, ->32
         30    >   IS_EQUAL                                         ~21     !5, '-'
         31        BOOL                                             ~20     ~21
         32    > > JMPZ                                                     ~20, ->34
         33    >   PRE_INC                                                  !2
    4    34    >   PRE_INC                                                  !1
         35    >   IS_SMALLER                                               !1, !0
         36      > JMPNZ                                                    ~24, ->5
   11    37    > > RETURN                                                   !3
   12    38*     > RETURN                                                   null

End of function multiid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.69 ms | 1394 KiB | 18 Q