3v4l.org

run code in 300+ PHP versions simultaneously
<?php function quickRandom($length = 16) { $length = intval($length, 10); $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $pool_length = 62; $output = ''; while($length--) { $output .= $pool[rand(0,$pool_length - 1)]; } return $output; } $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/NZhpa
function name:  (null)
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, 100000
   16     1      > JMP                                                      ->5
   17     2    >   INIT_FCALL                                               'quickrandom'
          3        SEND_VAL                                                 311
          4        DO_FCALL                                      0          
   16     5    >   POST_DEC                                         ~3      !0
          6      > JMPNZ                                                    ~3, ->2
   18     7    > > RETURN                                                   1

Function quickrandom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
Branch analysis from position: 10
filename:       /in/NZhpa
function name:  quickRandom
number of ops:  21
compiled vars:  !0 = $length, !1 = $pool, !2 = $pool_length, !3 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      16
    4     1        INIT_FCALL                                               'intval'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 10
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    5     6        ASSIGN                                                   !1, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    6     7        ASSIGN                                                   !2, 62
    7     8        ASSIGN                                                   !3, ''
    8     9      > JMP                                                      ->17
    9    10    >   INIT_FCALL                                               'rand'
         11        SEND_VAL                                                 0
         12        SUB                                              ~9      !2, 1
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        FETCH_DIM_R                                      ~11     !1, $10
         16        ASSIGN_OP                                     8          !3, ~11
    8    17    >   POST_DEC                                         ~13     !0
         18      > JMPNZ                                                    ~13, ->10
   12    19    > > RETURN                                                   !3
   13    20*     > RETURN                                                   null

End of function quickrandom

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.36 ms | 1399 KiB | 18 Q