3v4l.org

run code in 300+ PHP versions simultaneously
<?php function quickRandom($length = 16) { $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $str = substr(str_shuffle(str_repeat($pool, 5)), 0, $length); if ($length > 310) { return $str . quickRandom($length - 310); } return $str; } $i = 100000; while($i--) { quickRandom(311); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/8qOZL
function name:  (null)
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 100000
   13     1      > JMP                                                      ->5
   14     2    >   INIT_FCALL                                               'quickrandom'
          3        SEND_VAL                                                 311
          4        DO_FCALL                                      0          
   13     5    >   POST_DEC                                         ~3      !0
          6      > JMPNZ                                                    ~3, ->2
   15     7    > > RETURN                                                   1

Function quickrandom:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8qOZL
function name:  quickRandom
number of ops:  25
compiled vars:  !0 = $length, !1 = $pool, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      16
    4     1        ASSIGN                                                   !1, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    5     2        INIT_FCALL                                               'substr'
          3        INIT_FCALL                                               'str_shuffle'
          4        INIT_FCALL                                               'str_repeat'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 5
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        SEND_VAL                                                 0
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !2, $6
    6    15        IS_SMALLER                                               310, !0
         16      > JMPZ                                                     ~8, ->23
    7    17    >   INIT_FCALL_BY_NAME                                       'quickRandom'
         18        SUB                                              ~9      !0, 310
         19        SEND_VAL_EX                                              ~9
         20        DO_FCALL                                      0  $10     
         21        CONCAT                                           ~11     !2, $10
         22      > RETURN                                                   ~11
    9    23    > > RETURN                                                   !2
   10    24*     > RETURN                                                   null

End of function quickrandom

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153 ms | 1402 KiB | 21 Q