3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); require_once('flag.php'); $s1 = $_GET[md5($_SERVER['REMOTE_ADDRESS'])]; $s2 = $_GET[md5($_SERVER['HTTP_USER_AGENT'])]; if ($s1!=$s2) { if (md5($s1)===hash('md5',$s2)) { if (hash('sha512',$s1,true)!= hash('sha512',$s2,true)) { define("FLAG","123"); echo 'You got it'.FLAG; } } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 50
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 50
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 50
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
Branch analysis from position: 50
Branch analysis from position: 50
filename:       /in/5sMGm
function name:  (null)
number of ops:  51
compiled vars:  !0 = $s1, !1 = $s2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    3     3        INCLUDE_OR_EVAL                                          'flag.php', REQUIRE_ONCE
    5     4        INIT_FCALL                                               'md5'
          5        FETCH_R                      global              ~5      '_SERVER'
          6        FETCH_DIM_R                                      ~6      ~5, 'REMOTE_ADDRESS'
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9        FETCH_R                      global              ~4      '_GET'
         10        FETCH_DIM_R                                      ~8      ~4, $7
         11        ASSIGN                                                   !0, ~8
    6    12        INIT_FCALL                                               'md5'
         13        FETCH_R                      global              ~11     '_SERVER'
         14        FETCH_DIM_R                                      ~12     ~11, 'HTTP_USER_AGENT'
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                         $13     
         17        FETCH_R                      global              ~10     '_GET'
         18        FETCH_DIM_R                                      ~14     ~10, $13
         19        ASSIGN                                                   !1, ~14
    8    20        IS_NOT_EQUAL                                             !0, !1
         21      > JMPZ                                                     ~16, ->50
   10    22    >   INIT_FCALL                                               'md5'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $17     
         25        INIT_FCALL                                               'hash'
         26        SEND_VAL                                                 'md5'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $18     
         29        IS_IDENTICAL                                             $17, $18
         30      > JMPZ                                                     ~19, ->50
   12    31    >   INIT_FCALL                                               'hash'
         32        SEND_VAL                                                 'sha512'
         33        SEND_VAR                                                 !0
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $20     
         36        INIT_FCALL                                               'hash'
         37        SEND_VAL                                                 'sha512'
         38        SEND_VAR                                                 !1
         39        SEND_VAL                                                 <true>
         40        DO_ICALL                                         $21     
         41        IS_NOT_EQUAL                                             $20, $21
         42      > JMPZ                                                     ~22, ->50
   14    43    >   INIT_FCALL                                               'define'
         44        SEND_VAL                                                 'FLAG'
         45        SEND_VAL                                                 '123'
         46        DO_ICALL                                                 
   15    47        FETCH_CONSTANT                                   ~24     'FLAG'
         48        CONCAT                                           ~25     'You+got+it', ~24
         49        ECHO                                                     ~25
   20    50    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.03 ms | 1400 KiB | 21 Q