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; } echo strlen(quickRandom(315));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bV1Jh
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'quickrandom'
          1        SEND_VAL                                                 315
          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
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/bV1Jh
function name:  quickRandom
number of ops:  25
compiled vars:  !0 = $length, !1 = $pool, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      16
    3     1        ASSIGN                                                   !1, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    4     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
    5    15        IS_SMALLER                                               310, !0
         16      > JMPZ                                                     ~8, ->23
    6    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
    8    23    > > RETURN                                                   !2
    9    24*     > RETURN                                                   null

End of function quickrandom

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.96 ms | 1399 KiB | 20 Q