3v4l.org

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

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

End of function createpassword

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.31 ms | 1399 KiB | 22 Q