3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 10; $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, strlen($characters) - 1)]; } echo $randomString;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
Branch analysis from position: 5
filename:       /in/T3Uuu
function name:  (null)
number of ops:  18
compiled vars:  !0 = $length, !1 = $characters, !2 = $randomString, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
    3     1        ASSIGN                                                   !1, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    4     2        ASSIGN                                                   !2, ''
    5     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->14
    6     5    >   INIT_FCALL                                               'rand'
          6        SEND_VAL                                                 0
          7        STRLEN                                           ~8      !1
          8        SUB                                              ~9      ~8, 1
          9        SEND_VAL                                                 ~9
         10        DO_ICALL                                         $10     
         11        FETCH_DIM_R                                      ~11     !1, $10
         12        ASSIGN_OP                                     8          !2, ~11
    5    13        PRE_INC                                                  !3
         14    >   IS_SMALLER                                               !3, !0
         15      > JMPNZ                                                    ~14, ->5
    8    16    >   ECHO                                                     !2
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.68 ms | 1395 KiB | 15 Q