3v4l.org

run code in 300+ 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 = 12
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
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:  28
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, ->12
         11    > > EXIT                                                     'Fill+in+details'
   13    12    >   INIT_FCALL                                               'hash'
         13        SEND_VAL                                                 'sha256'
         14        CONCAT                                           ~10     !2, '%7C'
         15        CONCAT                                           ~11     ~10, !1
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !3, $12
   15    19        IS_EQUAL                                                 !0, !3
         20      > JMPZ                                                     ~14, ->23
         21    >   QM_ASSIGN                                        ~15     'Yes'
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~15     'No'
         24    >   CONCAT                                           ~16     'Hash+matches%3A+', ~15
         25        CONCAT                                           ~17     ~16, '%0A'
         26        ECHO                                                     ~17
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
123.1 ms | 1446 KiB | 14 Q