3v4l.org

run code in 500+ PHP versions simultaneously
<?php /* * Fill in all five below and click blue 'eval();' button below textarea. * * ------------------ */ $hash = ''; #Hash SHA256 $secret = ''; #Secret $minefield = ''; #Mminefield /* ------------------ */ if ($hash == '' || $secret == '' || $minefield == '') exit("Fill in details"); $sha256 = hash('sha256', $minefield.'|'.$secret); echo "Hash matches: ".($hash == $sha256 ? 'Yes': 'No')."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 7
filename:       /in/cMeXO
function name:  (null)
number of ops:  30
compiled vars:  !0 = $hash, !1 = $secret, !2 = $minefield, !3 = $sha256
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                       !0, ''
    7     1        ASSIGN                                                       !1, ''
    8     2        ASSIGN                                                       !2, ''
   11     3        IS_EQUAL                                             ~7      !0, ''
          4      > JMPNZ_EX                                             ~7      ~7, ->7
          5    >   IS_EQUAL                                             ~8      !1, ''
          6        BOOL                                                 ~7      ~8
          7    > > JMPNZ_EX                                             ~7      ~7, ->10
          8    >   IS_EQUAL                                             ~9      !2, ''
          9        BOOL                                                 ~7      ~9
         10    > > JMPZ                                                         ~7, ->14
         11    > > INIT_FCALL                                                   'exit'
         12*       SEND_VAL                                                     'Fill+in+details'
         13*       DO_ICALL                                                     
   13    14    >   INIT_FCALL                                                   'hash'
         15        SEND_VAL                                                     'sha256'
         16        CONCAT                                               ~11     !2, '%7C'
         17        CONCAT                                               ~12     ~11, !1
         18        SEND_VAL                                                     ~12
         19        DO_ICALL                                             $13     
         20        ASSIGN                                                       !3, $13
   15    21        IS_EQUAL                                                     !0, !3
         22      > JMPZ                                                         ~15, ->25
         23    >   QM_ASSIGN                                            ~16     'Yes'
         24      > JMP                                                          ->26
         25    >   QM_ASSIGN                                            ~16     'No'
         26    >   CONCAT                                               ~17     'Hash+matches%3A+', ~16
         27        CONCAT                                               ~18     ~17, '%0A'
         28        ECHO                                                         ~18
         29      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.23 ms | 1995 KiB | 16 Q