3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (get_magic_quotes_gpc()) { echo 'mq enabled<BR>'; echo $_GET['lastname'],'<BR>'; // O\'reilly //echo addslashes($_GET['lastname']),'<BR>'; // O\\\'reilly -- why??? $lastname = stripslashes($_GET['lastname']); } else { echo 'no mq ...','<br>'; echo $_GET['lastname'],'<BR>'; $lastname = $_GET['lastname']; } // If using MySQL $lastname = mysql_real_escape_string($lastname); echo $lastname; // O\'reilly
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
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: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/co3uM
function name:  (null)
number of ops:  30
compiled vars:  !0 = $lastname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
          1        DO_FCALL                                      0  $1      
          2      > JMPZ                                                     $1, ->15
    4     3    >   ECHO                                                     'mq+enabled%3CBR%3E'
    5     4        FETCH_R                      global              ~2      '_GET'
          5        FETCH_DIM_R                                      ~3      ~2, 'lastname'
          6        ECHO                                                     ~3
          7        ECHO                                                     '%3CBR%3E'
    7     8        INIT_FCALL                                               'stripslashes'
          9        FETCH_R                      global              ~4      '_GET'
         10        FETCH_DIM_R                                      ~5      ~4, 'lastname'
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !0, $6
         14      > JMP                                                      ->24
   10    15    >   ECHO                                                     'no+mq+...'
         16        ECHO                                                     '%3Cbr%3E'
   11    17        FETCH_R                      global              ~8      '_GET'
         18        FETCH_DIM_R                                      ~9      ~8, 'lastname'
         19        ECHO                                                     ~9
         20        ECHO                                                     '%3CBR%3E'
   12    21        FETCH_R                      global              ~10     '_GET'
         22        FETCH_DIM_R                                      ~11     ~10, 'lastname'
         23        ASSIGN                                                   !0, ~11
   16    24    >   INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         25        SEND_VAR_EX                                              !0
         26        DO_FCALL                                      0  $13     
         27        ASSIGN                                                   !0, $13
   18    28        ECHO                                                     !0
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.62 ms | 1396 KiB | 15 Q