3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sql($data){ $data = urldecode($data); if (is_numeric($data)) { return $data; } else if (!get_magic_quotes_gpc()) { return mysql_real_escape_string($data); } else { return $data; } } print(sql('toto')) ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fZnD8
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'sql'
          1        SEND_VAL                                                 'toto'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   22     4      > RETURN                                                   1

Function sql:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fZnD8
function name:  sql
number of ops:  22
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'urldecode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    6     5        INIT_FCALL                                               'is_numeric'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8      > JMPZ                                                     $3, ->11
    8     9    > > RETURN                                                   !0
         10*       JMP                                                      ->21
   10    11    >   INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
         12        DO_FCALL                                      0  $4      
         13        BOOL_NOT                                         ~5      $4
         14      > JMPZ                                                     ~5, ->20
   12    15    >   INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $6      
         18      > RETURN                                                   $6
         19*       JMP                                                      ->21
   16    20    > > RETURN                                                   !0
   18    21*     > RETURN                                                   null

End of function sql

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.97 ms | 1399 KiB | 21 Q