3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 38; for ($x=$s=$r=0; $x<$n; $x++) { $c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890'; if (($x<$n) && ($x > 0) && ($s < 2)) { $c .= '-_'; } $r .= substr($c, mt_rand(0, strlen($c) - 1), 1); if (($r == '_') || ($r == '-')) { $s++; } } echo $r;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 5
Branch analysis from position: 36
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 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 5
Branch analysis from position: 36
Branch analysis from position: 5
Branch analysis from position: 33
Branch analysis from position: 31
Branch analysis from position: 15
Branch analysis from position: 13
Branch analysis from position: 10
filename:       /in/Z45e1
function name:  (null)
number of ops:  38
compiled vars:  !0 = $n, !1 = $x, !2 = $s, !3 = $r, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 38
    4     1        ASSIGN                                           ~6      !3, 0
          2        ASSIGN                                           ~7      !2, ~6
          3        ASSIGN                                                   !1, ~7
          4      > JMP                                                      ->34
    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_OP                                     8          !3, $17
    8    27        IS_EQUAL                                         ~19     !3, '_'
         28      > JMPNZ_EX                                         ~19     ~19, ->31
         29    >   IS_EQUAL                                         ~20     !3, '-'
         30        BOOL                                             ~19     ~20
         31    > > JMPZ                                                     ~19, ->33
         32    >   PRE_INC                                                  !2
    4    33    >   PRE_INC                                                  !1
         34    >   IS_SMALLER                                               !1, !0
         35      > JMPNZ                                                    ~23, ->5
   11    36    >   ECHO                                                     !3
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.04 ms | 1400 KiB | 17 Q