3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This is stored in the file: $storedhash = hash("sha256", "salt" + "password"); echo $storedhash + "\n"; // Logging in: $password = "passworld"; $pwdhash = hash("sha256", "salt" + $password); echo $pwdhash + "\n"; if ($pwdhash === $storedhash) { echo "Successfully entered password"; } else { echo "Nofie."; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cPDic
function name:  (null)
number of ops:  23
compiled vars:  !0 = $storedhash, !1 = $password, !2 = $pwdhash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'hash'
          1        SEND_VAL                                                 'sha256'
          2        ADD                                              ~3      'salt', 'password'
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    5     6        ADD                                              ~6      !0, '%0A'
          7        ECHO                                                     ~6
    8     8        ASSIGN                                                   !1, 'passworld'
    9     9        INIT_FCALL                                               'hash'
         10        SEND_VAL                                                 'sha256'
         11        ADD                                              ~8      'salt', !1
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !2, $9
   10    15        ADD                                              ~11     !2, '%0A'
         16        ECHO                                                     ~11
   11    17        IS_IDENTICAL                                             !2, !0
         18      > JMPZ                                                     ~12, ->21
   13    19    >   ECHO                                                     'Successfully+entered+password'
         20      > JMP                                                      ->22
   15    21    >   ECHO                                                     'Nofie.'
   16    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.8 ms | 1395 KiB | 15 Q