3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hasha($passwordoriginale){ $crypt = md5(sha1(md5(md5(sha1($passwordoriginale))))); $caratteri_disponibili ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; $lunghezza= 22; $salt = ""; for($i = 0; $i<$lunghezza; $i++){ $salt = $salt.substr($caratteri_disponibili,rand(0,strlen($caratteri_disponibili)-1),1); } $newsalt= '$2a$07$'.$salt.'$'; $hashed_password = crypt($crypt,$newsalt); return $hashed_password; } $passworddacrittare = "password"; $passwordcrittata = hasha($passworddacrittare); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OfJJV
function name:  (null)
number of ops:  6
compiled vars:  !0 = $passworddacrittare, !1 = $passwordcrittata
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 'password'
   15     1        INIT_FCALL                                               'hasha'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   16     5      > RETURN                                                   1

Function hasha:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 22
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 22
Branch analysis from position: 38
Branch analysis from position: 22
filename:       /in/OfJJV
function name:  hasha
number of ops:  48
compiled vars:  !0 = $passwordoriginale, !1 = $crypt, !2 = $caratteri_disponibili, !3 = $lunghezza, !4 = $salt, !5 = $i, !6 = $newsalt, !7 = $hashed_password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'md5'
          2        INIT_FCALL                                               'sha1'
          3        INIT_FCALL                                               'md5'
          4        INIT_FCALL                                               'md5'
          5        INIT_FCALL                                               'sha1'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $8      
          8        SEND_VAR                                                 $8
          9        DO_ICALL                                         $9      
         10        SEND_VAR                                                 $9
         11        DO_ICALL                                         $10     
         12        SEND_VAR                                                 $10
         13        DO_ICALL                                         $11     
         14        SEND_VAR                                                 $11
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !1, $12
    4    17        ASSIGN                                                   !2, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'
    5    18        ASSIGN                                                   !3, 22
    6    19        ASSIGN                                                   !4, ''
    7    20        ASSIGN                                                   !5, 0
         21      > JMP                                                      ->36
    8    22    >   INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !2
         24        INIT_FCALL                                               'rand'
         25        SEND_VAL                                                 0
         26        STRLEN                                           ~18     !2
         27        SUB                                              ~19     ~18, 1
         28        SEND_VAL                                                 ~19
         29        DO_ICALL                                         $20     
         30        SEND_VAR                                                 $20
         31        SEND_VAL                                                 1
         32        DO_ICALL                                         $21     
         33        CONCAT                                           ~22     !4, $21
         34        ASSIGN                                                   !4, ~22
    7    35        PRE_INC                                                  !5
         36    >   IS_SMALLER                                               !5, !3
         37      > JMPNZ                                                    ~25, ->22
   10    38    >   CONCAT                                           ~26     '%242a%2407%24', !4
         39        CONCAT                                           ~27     ~26, '%24'
         40        ASSIGN                                                   !6, ~27
   11    41        INIT_FCALL                                               'crypt'
         42        SEND_VAR                                                 !1
         43        SEND_VAR                                                 !6
         44        DO_ICALL                                         $29     
         45        ASSIGN                                                   !7, $29
   12    46      > RETURN                                                   !7
   13    47*     > RETURN                                                   null

End of function hasha

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.3 ms | 1403 KiB | 24 Q