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")." >> "; set_magic_quotes_runtime(true); echo "1) ".get_magic_quotes_runtime()." >> "; echo "2) ".ini_get("magic_quotes_runtime")." >> "; $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/rumMn
function name:  (null)
number of ops:  69
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        INIT_FCALL_BY_NAME                                       'set_magic_quotes_runtime'
         25        SEND_VAL_EX                                              <true>
         26        DO_FCALL                                      0          
   10    27        INIT_FCALL_BY_NAME                                       'get_magic_quotes_runtime'
         28        DO_FCALL                                      0  $17     
         29        CONCAT                                           ~18     '1%29+', $17
         30        CONCAT                                           ~19     ~18, '+%3E%3E+'
         31        ECHO                                                     ~19
   11    32        INIT_FCALL                                               'ini_get'
         33        SEND_VAL                                                 'magic_quotes_runtime'
         34        DO_ICALL                                         $20     
         35        CONCAT                                           ~21     '2%29+', $20
         36        CONCAT                                           ~22     ~21, '+%3E%3E+'
         37        ECHO                                                     ~22
   13    38        ASSIGN                                                   !2, '%27%22'
   14    39        ASSIGN                                                   !3, <array>
   15    40        CONCAT                                           ~26     'string+%3A+', !2
         41        ASSIGN_DIM                                               !3
         42        OP_DATA                                                  ~26
   16    43        INIT_FCALL                                               'addslashes'
         44        SEND_VAR                                                 !2
         45        DO_ICALL                                         $28     
         46        CONCAT                                           ~29     'addslashes+%3A+', $28
         47        ASSIGN_DIM                                               !3
         48        OP_DATA                                                  ~29
   17    49        INIT_FCALL                                               'stripslashes'
         50        SEND_VAR                                                 !2
         51        DO_ICALL                                         $31     
         52        CONCAT                                           ~32     'stripslashes+%3A+', $31
         53        ASSIGN_DIM                                               !3
         54        OP_DATA                                                  ~32
   18    55        INIT_FCALL                                               'htmlentities'
         56        SEND_VAR                                                 !2
         57        DO_ICALL                                         $34     
         58        CONCAT                                           ~35     'htmlentities+%3A+', $34
         59        ASSIGN_DIM                                               !3
         60        OP_DATA                                                  ~35
   19    61        CONCAT                                           ~37     'testing+%3A+%27', !2
         62        CONCAT                                           ~38     ~37, '%27'
         63        ASSIGN_DIM                                               !3
         64        OP_DATA                                                  ~38
   20    65        INIT_FCALL                                               'print_r'
         66        SEND_VAR                                                 !3
         67        DO_ICALL                                                 
         68      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.69 ms | 1400 KiB | 25 Q