3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pswd($password) { $conf = new DataStorage(); /*if($conf->value('app.password.salt') !== false) $salt = '$2y$'.$conf->value('app.password.salt').'$'; else*/ $salt = '$2y$'.substr(md5('zaqDFGDws123xc456derfPOADv78bg9tyGISh0nmjukiolp'), 0, 22).'$'; if(!function_exists('password_hash')) return crypt($password, $salt); else return password_hash($password, PASSWORD_DEFAULT, ['salt' => $salt, 'cost' => 12]); } echo pswd('1q2w3e4r5t');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DgO0U
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'pswd'
          1        SEND_VAL                                                 '1q2w3e4r5t'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function pswd:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DgO0U
function name:  pswd
number of ops:  35
compiled vars:  !0 = $password, !1 = $conf, !2 = $salt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        NEW                                              $3      'DataStorage'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    8     4        INIT_FCALL                                               'substr'
          5        INIT_FCALL                                               'md5'
          6        SEND_VAL                                                 'zaqDFGDws123xc456derfPOADv78bg9tyGISh0nmjukiolp'
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 22
         11        DO_ICALL                                         $7      
         12        CONCAT                                           ~8      '%242y%24', $7
         13        CONCAT                                           ~9      ~8, '%24'
         14        ASSIGN                                                   !2, ~9
   10    15        INIT_FCALL                                               'function_exists'
         16        SEND_VAL                                                 'password_hash'
         17        DO_ICALL                                         $11     
         18        BOOL_NOT                                         ~12     $11
         19      > JMPZ                                                     ~12, ->26
   11    20    >   INIT_FCALL                                               'crypt'
         21        SEND_VAR                                                 !0
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $13     
         24      > RETURN                                                   $13
         25*       JMP                                                      ->34
   13    26    >   INIT_FCALL                                               'password_hash'
         27        SEND_VAR                                                 !0
         28        SEND_VAL                                                 '2y'
         29        INIT_ARRAY                                       ~14     !2, 'salt'
         30        ADD_ARRAY_ELEMENT                                ~14     12, 'cost'
         31        SEND_VAL                                                 ~14
         32        DO_ICALL                                         $15     
         33      > RETURN                                                   $15
   14    34*     > RETURN                                                   null

End of function pswd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.22 ms | 1403 KiB | 24 Q