3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateSalt($len = 32) { $salt = ""; for ($i = 0; $i < $len; $i++) { $index = rand(0, (strlen($this->chars) - 1)); $salt .= $this->chars[$index]; } return $salt; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jjFd5
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 generatesalt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 4
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 4
Branch analysis from position: 20
Branch analysis from position: 4
filename:       /in/jjFd5
function name:  generateSalt
number of ops:  22
compiled vars:  !0 = $len, !1 = $salt, !2 = $i, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      32
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->18
    5     4    >   INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 0
          6        FETCH_THIS                                       $6      
          7        FETCH_OBJ_R                                      ~7      $6, 'chars'
          8        STRLEN                                           ~8      ~7
          9        SUB                                              ~9      ~8, 1
         10        SEND_VAL                                                 ~9
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    6    13        FETCH_THIS                                       $12     
         14        FETCH_OBJ_R                                      ~13     $12, 'chars'
         15        FETCH_DIM_R                                      ~14     ~13, !3
         16        ASSIGN_OP                                     8          !1, ~14
    4    17        PRE_INC                                                  !2
         18    >   IS_SMALLER                                               !2, !0
         19      > JMPNZ                                                    ~17, ->4
    8    20    > > RETURN                                                   !1
    9    21*     > RETURN                                                   null

End of function generatesalt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.27 ms | 1387 KiB | 15 Q