3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mt_rand_str ($l, $c = '123456789CDEFGHJKLMN') { for ($s = '', $cl = strlen($c)-1, $i = 0; $i < $l; $s .= $c[mt_rand(0, $cl)], ++$i); return $s; } $code = mt_rand_str(10, '123456789CDEFGHJKLMN'); echo $code; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RT3IA
function name:  (null)
number of ops:  7
compiled vars:  !0 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'mt_rand_str'
          1        SEND_VAL                                                 10
          2        SEND_VAL                                                 '123456789CDEFGHJKLMN'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    8     5        ECHO                                                     !0
    9     6      > RETURN                                                   1

Function mt_rand_str:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/RT3IA
function name:  mt_rand_str
number of ops:  19
compiled vars:  !0 = $l, !1 = $c, !2 = $s, !3 = $cl, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      '123456789CDEFGHJKLMN'
    4     2        ASSIGN                                                   !2, ''
          3        STRLEN                                           ~6      !1
          4        SUB                                              ~7      ~6, 1
          5        ASSIGN                                                   !3, ~7
          6        ASSIGN                                                   !4, 0
          7      > JMP                                                      ->15
          8    >   INIT_FCALL                                               'mt_rand'
          9        SEND_VAL                                                 0
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $10     
         12        FETCH_DIM_R                                      ~11     !1, $10
         13        ASSIGN_OP                                     8          !2, ~11
         14        PRE_INC                                                  !4
         15    >   IS_SMALLER                                               !4, !0
         16      > JMPNZ                                                    ~14, ->8
    5    17    > > RETURN                                                   !2
    6    18*     > RETURN                                                   null

End of function mt_rand_str

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.17 ms | 1390 KiB | 16 Q