3v4l.org

run code in 300+ PHP versions simultaneously
<?php function random($length = 8) { return substr(base_convert(bin2hex(openssl_random_pseudo_bytes($length)), 16, 36), 0, $length); } /* function random($length = 8) { return strtr(substr(base64_encode(openssl_random_pseudo_bytes($length)), 0, $length), '/+=', '_-.'); } */ for ($i=1; $i<64; $i++) { $str = random($i); echo "$str\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/AhqDs
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->10
   16     2    >   INIT_FCALL                                               'random'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   17     6        NOP                                                      
          7        FAST_CONCAT                                      ~5      !1, '%0A'
          8        ECHO                                                     ~5
   14     9        PRE_INC                                                  !0
         10    >   IS_SMALLER                                               !0, 64
         11      > JMPNZ                                                    ~7, ->2
   18    12    > > RETURN                                                   1

Function random:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AhqDs
function name:  random
number of ops:  19
compiled vars:  !0 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      8
    4     1        INIT_FCALL                                               'substr'
          2        INIT_FCALL                                               'base_convert'
          3        INIT_FCALL                                               'bin2hex'
          4        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        SEND_VAL                                                 16
         11        SEND_VAL                                                 36
         12        DO_ICALL                                         $3      
         13        SEND_VAR                                                 $3
         14        SEND_VAL                                                 0
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $4      
         17      > RETURN                                                   $4
    5    18*     > RETURN                                                   null

End of function random

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.99 ms | 1399 KiB | 20 Q