3v4l.org

run code in 300+ PHP versions simultaneously
<?php //generate salt-----------------------------------> $salt; $password = "texmex"; for ($i=0; $i<=32; $i++) { $d=rand(1,30)%2; $salt .= $d ? chr(rand(65,90)) : chr(rand(48,57)); } //end generate salt--------------------------------| //hash password with salt--> $hashed = md5($password . $salt); //here is your new encrypted password, ready to store in the database table, `jos_users` echo $encrypted = $hashed . ':' . $salt;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 3
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 3
Branch analysis from position: 31
Branch analysis from position: 3
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 3
Branch analysis from position: 31
Branch analysis from position: 3
filename:       /in/qtEg0
function name:  (null)
number of ops:  41
compiled vars:  !0 = $salt, !1 = $password, !2 = $i, !3 = $d, !4 = $hashed, !5 = $encrypted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !1, 'texmex'
    5     1        ASSIGN                                                   !2, 0
          2      > JMP                                                      ->29
    6     3    >   INIT_FCALL                                               'rand'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 30
          6        DO_ICALL                                         $8      
          7        MOD                                              ~9      $8, 2
          8        ASSIGN                                                   !3, ~9
    7     9      > JMPZ                                                     !3, ->19
         10    >   INIT_FCALL                                               'chr'
         11        INIT_FCALL                                               'rand'
         12        SEND_VAL                                                 65
         13        SEND_VAL                                                 90
         14        DO_ICALL                                         $11     
         15        SEND_VAR                                                 $11
         16        DO_ICALL                                         $12     
         17        QM_ASSIGN                                        ~13     $12
         18      > JMP                                                      ->27
         19    >   INIT_FCALL                                               'chr'
         20        INIT_FCALL                                               'rand'
         21        SEND_VAL                                                 48
         22        SEND_VAL                                                 57
         23        DO_ICALL                                         $14     
         24        SEND_VAR                                                 $14
         25        DO_ICALL                                         $15     
         26        QM_ASSIGN                                        ~13     $15
         27    >   ASSIGN_OP                                     8          !0, ~13
    5    28        PRE_INC                                                  !2
         29    >   IS_SMALLER_OR_EQUAL                                      !2, 32
         30      > JMPNZ                                                    ~18, ->3
   12    31    >   INIT_FCALL                                               'md5'
         32        CONCAT                                           ~19     !1, !0
         33        SEND_VAL                                                 ~19
         34        DO_ICALL                                         $20     
         35        ASSIGN                                                   !4, $20
   15    36        CONCAT                                           ~22     !4, '%3A'
         37        CONCAT                                           ~23     ~22, !0
         38        ASSIGN                                           ~24     !5, ~23
         39        ECHO                                                     ~24
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.61 ms | 1392 KiB | 19 Q