3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This is stored in the file: $storedhash = hash("sha256", "salt" + "password"); echo $storedhash; // Logging in: $password = "passworld"; $pwdhash = hash("sha256", "salt" + $password); echo $pwdhash; 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 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YkqUk
function name:  (null)
number of ops:  21
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        ECHO                                                     !0
    8     7        ASSIGN                                                   !1, 'passworld'
    9     8        INIT_FCALL                                               'hash'
          9        SEND_VAL                                                 'sha256'
         10        ADD                                              ~7      'salt', !1
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
   10    14        ECHO                                                     !2
   11    15        IS_IDENTICAL                                             !2, !0
         16      > JMPZ                                                     ~10, ->19
   13    17    >   ECHO                                                     'Successfully+entered+password'
         18      > JMP                                                      ->20
   15    19    >   ECHO                                                     'Nofie.'
   16    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.36 ms | 1395 KiB | 15 Q