3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = get_magic_quotes_gpc(); $b = ini_get("magic_quotes_gpc"); var_dump($a); var_dump($b); echo "1) ".get_magic_quotes_gpc()." >> "; echo "2) ".ini_get("magic_quotes_gpc")." >> "; $str = "'\""; $arr = array(); $arr[] = "string : ".$str; $arr[] = "addslashes : ".addslashes($str); $arr[] = "stripslashes : ".stripslashes($str); $arr[] = "htmlentities : ".htmlentities($str); $arr[] = "testing : '".$str."'"; print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e9fOd
function name:  (null)
number of ops:  55
compiled vars:  !0 = $a, !1 = $b, !2 = $str, !3 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
          1        DO_FCALL                                      0  $4      
          2        ASSIGN                                                   !0, $4
    3     3        INIT_FCALL                                               'ini_get'
          4        SEND_VAL                                                 'magic_quotes_gpc'
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    4     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    6    13        INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
         14        DO_FCALL                                      0  $10     
         15        CONCAT                                           ~11     '1%29+', $10
         16        CONCAT                                           ~12     ~11, '+%3E%3E+'
         17        ECHO                                                     ~12
    7    18        INIT_FCALL                                               'ini_get'
         19        SEND_VAL                                                 'magic_quotes_gpc'
         20        DO_ICALL                                         $13     
         21        CONCAT                                           ~14     '2%29+', $13
         22        CONCAT                                           ~15     ~14, '+%3E%3E+'
         23        ECHO                                                     ~15
    9    24        ASSIGN                                                   !2, '%27%22'
   10    25        ASSIGN                                                   !3, <array>
   11    26        CONCAT                                           ~19     'string+%3A+', !2
         27        ASSIGN_DIM                                               !3
         28        OP_DATA                                                  ~19
   12    29        INIT_FCALL                                               'addslashes'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $21     
         32        CONCAT                                           ~22     'addslashes+%3A+', $21
         33        ASSIGN_DIM                                               !3
         34        OP_DATA                                                  ~22
   13    35        INIT_FCALL                                               'stripslashes'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                         $24     
         38        CONCAT                                           ~25     'stripslashes+%3A+', $24
         39        ASSIGN_DIM                                               !3
         40        OP_DATA                                                  ~25
   14    41        INIT_FCALL                                               'htmlentities'
         42        SEND_VAR                                                 !2
         43        DO_ICALL                                         $27     
         44        CONCAT                                           ~28     'htmlentities+%3A+', $27
         45        ASSIGN_DIM                                               !3
         46        OP_DATA                                                  ~28
   15    47        CONCAT                                           ~30     'testing+%3A+%27', !2
         48        CONCAT                                           ~31     ~30, '%27'
         49        ASSIGN_DIM                                               !3
         50        OP_DATA                                                  ~31
   16    51        INIT_FCALL                                               'print_r'
         52        SEND_VAR                                                 !3
         53        DO_ICALL                                                 
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.06 ms | 1400 KiB | 25 Q