3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type:text/plain'); // Asume loginserver as 0 $_POST['loginserver'] = 0; if ($_POST['loginserver'] == 'login'){ echo "Type conversion bug", PHP_EOL; // This should not print } else{ echo "Ok", PHP_EOL; } // Proper Way use === if ($_POST['loginserver'] === 'login'){ echo "Welcome", PHP_EOL; // This should not print } else{ echo "Proper Way", PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
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: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
Branch analysis from position: 22
filename:       /in/mVGWX
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3Atext%2Fplain'
          2        DO_ICALL                                                 
    5     3        FETCH_W                      global              $1      '_POST'
          4        ASSIGN_DIM                                               $1, 'loginserver'
          5        OP_DATA                                                  0
    7     6        FETCH_R                      global              ~3      '_POST'
          7        FETCH_DIM_R                                      ~4      ~3, 'loginserver'
          8        IS_EQUAL                                                 ~4, 'login'
          9      > JMPZ                                                     ~5, ->13
    8    10    >   ECHO                                                     'Type+conversion+bug'
         11        ECHO                                                     '%0A'
         12      > JMP                                                      ->15
   10    13    >   ECHO                                                     'Ok'
         14        ECHO                                                     '%0A'
   14    15    >   FETCH_R                      global              ~6      '_POST'
         16        FETCH_DIM_R                                      ~7      ~6, 'loginserver'
         17        IS_IDENTICAL                                             ~7, 'login'
         18      > JMPZ                                                     ~8, ->22
   15    19    >   ECHO                                                     'Welcome'
         20        ECHO                                                     '%0A'
         21      > JMP                                                      ->24
   17    22    >   ECHO                                                     'Proper+Way'
         23        ECHO                                                     '%0A'
   18    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.12 ms | 1388 KiB | 15 Q