3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callStoredProc( $storedProc ) { $args = func_get_args(); $storedProc = shift( $args ); foreach ( $args as $i => $arg) $args[$i] = "'" . mysql_real_escape_string( $arg ) . "'"; $argStr = implode( ',', $args ); echo sprintf( 'call %s( %s )', $storedProc, implode( ',', $args ) ); } callStoredProc( 'something', 1, 'a', 'b\'' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MLFGC
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'callstoredproc'
          1        SEND_VAL                                                 'something'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 'a'
          4        SEND_VAL                                                 'b%27'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function callstoredproc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/MLFGC
function name:  callStoredProc
number of ops:  35
compiled vars:  !0 = $storedProc, !1 = $args, !2 = $arg, !3 = $i, !4 = $argStr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        FUNC_GET_ARGS                                    ~5      
          2        ASSIGN                                                   !1, ~5
    7     3        INIT_FCALL_BY_NAME                                       'shift'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !0, $7
    8     7      > FE_RESET_R                                       $9      !1, ->18
          8    > > FE_FETCH_R                                       ~10     $9, !2, ->18
          9    >   ASSIGN                                                   !3, ~10
    9    10        INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0  $13     
         13        CONCAT                                           ~14     '%27', $13
         14        CONCAT                                           ~15     ~14, '%27'
         15        ASSIGN_DIM                                               !1, !3
         16        OP_DATA                                                  ~15
    8    17      > JMP                                                      ->8
         18    >   FE_FREE                                                  $9
   11    19        INIT_FCALL                                               'implode'
         20        SEND_VAL                                                 '%2C'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !4, $16
   12    24        INIT_FCALL                                               'sprintf'
   13    25        SEND_VAL                                                 'call+%25s%28+%25s+%29'
   14    26        SEND_VAR                                                 !0
   15    27        INIT_FCALL                                               'implode'
         28        SEND_VAL                                                 '%2C'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $18     
         31        SEND_VAR                                                 $18
         32        DO_ICALL                                         $19     
         33        ECHO                                                     $19
   17    34      > RETURN                                                   null

End of function callstoredproc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.84 ms | 1403 KiB | 18 Q