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; echo $token. "\n"; $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/pTXID
function name:  (null)
number of ops:  40
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
    9    24        CONCAT                                           ~18     !4, '%0A'
         25        ECHO                                                     ~18
   10    26        INIT_FCALL                                               'sha1'
         27        CONCAT                                           ~19     !2, !1
         28        SEND_VAL                                                 ~19
         29        DO_ICALL                                         $20     
         30        BW_XOR                                           ~21     !4, $20
         31        ASSIGN                                                   !3, ~21
   12    32        ECHO                                                     '%3Cpre%3E'
   13    33        INIT_FCALL                                               'sha1'
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                         $23     
         36        ECHO                                                     $23
   14    37        ECHO                                                     '%0A'
   15    38        ECHO                                                     !1
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.49 ms | 1396 KiB | 17 Q