3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySQL{ public $debugMode = 0; private $sqlHandle; private $hostname; private $username; private $password; private $dbName; private $queryHandle; function __construct() { } static function mres($value) { $search = array("\\", "\x00", "\n", "\r", "'", '"', "\x1a"); $replace = array("\\\\","\\0","\\n", "\\r", "\'", '\"', "\\Z"); return str_replace($search, $replace, $value); } static function escapeContent($value) { $value = get_magic_quotes_gpc()?stripslashes($value):$value; return self::mres($value); } } print_r(array_map(array('MySQL', 'escapeContent'), array('1',2,3))); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rWD6M
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   35     7      > RETURN                                                   1

Class MySQL:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rWD6M
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   null

End of function __construct

Function mres:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rWD6M
function name:  mres
number of ops:  10
compiled vars:  !0 = $value, !1 = $search, !2 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        ASSIGN                                                   !1, <array>
   20     2        ASSIGN                                                   !2, <array>
   22     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8      > RETURN                                                   $5
   23     9*     > RETURN                                                   null

End of function mres

Function escapecontent:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rWD6M
function name:  escapeContent
number of ops:  16
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   28     1        INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
          2        DO_FCALL                                      0  $1      
          3      > JMPZ                                                     $1, ->9
          4    >   INIT_FCALL                                               'stripslashes'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        QM_ASSIGN                                        ~3      $2
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~3      !0
         10    >   ASSIGN                                                   !0, ~3
   29    11        INIT_STATIC_METHOD_CALL                                  'mres'
         12        SEND_VAR                                                 !0
         13        DO_FCALL                                      0  $5      
         14      > RETURN                                                   $5
   31    15*     > RETURN                                                   null

End of function escapecontent

End of class MySQL.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.59 ms | 1400 KiB | 24 Q