3v4l.org

run code in 300+ PHP versions simultaneously
<?php function quickRandom($length = 16) { $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $l = strlen($pool); $str = ''; while ($length--) { $str .= $pool[rand(0, $l)]; } return $str; } echo strlen(quickRandom(311));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OVvpA
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'quickrandom'
          1        SEND_VAL                                                 311
          2        DO_FCALL                                      0  $0      
          3        STRLEN                                           ~1      $0
          4        ECHO                                                     ~1
          5      > RETURN                                                   1

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

End of function quickrandom

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.65 ms | 1402 KiB | 16 Q