3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randStr($length = 32, $chars = 'abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ!@#$%&*()_-+=') { //function randStr($length, $chars) { $validCharNumber = strlen($chars); for ($i = 0; $i < $length; $i++) { $str .= $chars[rand(0, $validCharNumber - 1)]; } return $str; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c2JbJ
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   1

Function randstr:
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 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/c2JbJ
function name:  randStr
number of ops:  18
compiled vars:  !0 = $length, !1 = $chars, !2 = $validCharNumber, !3 = $i, !4 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      32
          1        RECV_INIT                                        !1      'abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ%21%40%23%24%25%26%2A%28%29_-%2B%3D'
    4     2        STRLEN                                           ~5      !1
          3        ASSIGN                                                   !2, ~5
    5     4        ASSIGN                                                   !3, 0
          5      > JMP                                                      ->14
    6     6    >   INIT_FCALL                                               'rand'
          7        SEND_VAL                                                 0
          8        SUB                                              ~8      !2, 1
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11        FETCH_DIM_R                                      ~10     !1, $9
         12        ASSIGN_OP                                     8          !4, ~10
    5    13        PRE_INC                                                  !3
         14    >   IS_SMALLER                                               !3, !0
         15      > JMPNZ                                                    ~13, ->6
    8    16    > > RETURN                                                   !4
    9    17*     > RETURN                                                   null

End of function randstr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.32 ms | 1399 KiB | 15 Q