3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt=""; function createPassword($input) { $salt = substr(md5(time()), 0, 20); return sha1($salt . sha1($input) . $salt); } createPassword("cieren"); echo $salt;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eT3bk
function name:  (null)
number of ops:  6
compiled vars:  !0 = $salt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
   12     1        INIT_FCALL                                               'createpassword'
          2        SEND_VAL                                                 'cieren'
          3        DO_FCALL                                      0          
   13     4        ECHO                                                     !0
          5      > RETURN                                                   1

Function createpassword:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eT3bk
function name:  createPassword
number of ops:  22
compiled vars:  !0 = $input, !1 = $salt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'substr'
          2        INIT_FCALL                                               'md5'
          3        INIT_FCALL                                               'time'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 20
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !1, $4
    8    12        INIT_FCALL                                               'sha1'
         13        INIT_FCALL                                               'sha1'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $6      
         16        CONCAT                                           ~7      !1, $6
         17        CONCAT                                           ~8      ~7, !1
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                         $9      
         20      > RETURN                                                   $9
    9    21*     > RETURN                                                   null

End of function createpassword

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1398 KiB | 22 Q