3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pw = 'test123'; $pwInDb = sha1(sha1($pw)); $scramble = mt_rand(); //token $stage1_hash = sha1($pw); $token = sha1($scramble . sha1($stage1_hash)) ^ $stage1_hash; $stage1_hash = $token ^ sha1($scramble . $pwInDb); echo '<pre>'; echo sha1($stage1_hash); echo "\n"; echo $pwInDb;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lpdIp
function name:  (null)
number of ops:  38
compiled vars:  !0 = $pw, !1 = $pwInDb, !2 = $scramble, !3 = $stage1_hash, !4 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test123'
    3     1        INIT_FCALL                                               'sha1'
          2        INIT_FCALL                                               'sha1'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        SEND_VAR                                                 $6
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !1, $7
    4     8        INIT_FCALL                                               'mt_rand'
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
    7    11        INIT_FCALL                                               'sha1'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !3, $11
    8    15        INIT_FCALL                                               'sha1'
         16        INIT_FCALL                                               'sha1'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $13     
         19        CONCAT                                           ~14     !2, $13
         20        SEND_VAL                                                 ~14
         21        DO_ICALL                                         $15     
         22        BW_XOR                                           ~16     !3, $15
         23        ASSIGN                                                   !4, ~16
   10    24        INIT_FCALL                                               'sha1'
         25        CONCAT                                           ~18     !2, !1
         26        SEND_VAL                                                 ~18
         27        DO_ICALL                                         $19     
         28        BW_XOR                                           ~20     !4, $19
         29        ASSIGN                                                   !3, ~20
   12    30        ECHO                                                     '%3Cpre%3E'
   13    31        INIT_FCALL                                               'sha1'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                         $22     
         34        ECHO                                                     $22
   14    35        ECHO                                                     '%0A'
   15    36        ECHO                                                     !1
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.13 ms | 1396 KiB | 17 Q