3v4l.org

run code in 300+ PHP versions simultaneously
<?php function comment_retrieve($amount = 0, $username = null, $file = null) { if ($file) { if ($amount > 0) { $querystring_file = ' AND `fc_forfile`=\'' . $username . '\''; } else { $querystring_file = ' WHERE `fc_forfile`=\'' . $username . '\''; } } else { $querystring_file = ''; } if ($username) { $querystring_username = ' WHERE `fc_byuser`=\'' . $username . '\''; } else { $querystring_username = ''; } if ($amount > 0) { $querystring_amount = ' LIMIT ' . $amount; } else { $querystring_amount = ''; } // query $querystring = "SELECT * FROM file_comments" . $querystring_username . $querystring_file . $querystring_amount; return $querystring; } echo comment_retrieve(7,null,'HJFG');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UnvCk
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_FCALL                                               'comment_retrieve'
          1        SEND_VAL                                                 7
          2        SEND_VAL                                                 null
          3        SEND_VAL                                                 'HJFG'
          4        DO_FCALL                                      0  $0      
          5        ECHO                                                     $0
          6      > RETURN                                                   1

Function comment_retrieve:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
Branch analysis from position: 26
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
Branch analysis from position: 20
filename:       /in/UnvCk
function name:  comment_retrieve
number of ops:  33
compiled vars:  !0 = $amount, !1 = $username, !2 = $file, !3 = $querystring_file, !4 = $querystring_username, !5 = $querystring_amount, !6 = $querystring
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      0
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
    5     3      > JMPZ                                                     !2, ->14
    6     4    >   IS_SMALLER                                               0, !0
          5      > JMPZ                                                     ~7, ->10
    7     6    >   CONCAT                                           ~8      '+AND+%60fc_forfile%60%3D%27', !1
          7        CONCAT                                           ~9      ~8, '%27'
          8        ASSIGN                                                   !3, ~9
          9      > JMP                                                      ->13
    9    10    >   CONCAT                                           ~11     '+WHERE+%60fc_forfile%60%3D%27', !1
         11        CONCAT                                           ~12     ~11, '%27'
         12        ASSIGN                                                   !3, ~12
         13    > > JMP                                                      ->15
   12    14    >   ASSIGN                                                   !3, ''
   15    15    > > JMPZ                                                     !1, ->20
   16    16    >   CONCAT                                           ~15     '+WHERE+%60fc_byuser%60%3D%27', !1
         17        CONCAT                                           ~16     ~15, '%27'
         18        ASSIGN                                                   !4, ~16
         19      > JMP                                                      ->21
   18    20    >   ASSIGN                                                   !4, ''
   21    21    >   IS_SMALLER                                               0, !0
         22      > JMPZ                                                     ~19, ->26
   22    23    >   CONCAT                                           ~20     '+LIMIT+', !0
         24        ASSIGN                                                   !5, ~20
         25      > JMP                                                      ->27
   24    26    >   ASSIGN                                                   !5, ''
   28    27    >   CONCAT                                           ~23     'SELECT+%2A+FROM+file_comments', !4
         28        CONCAT                                           ~24     ~23, !3
         29        CONCAT                                           ~25     ~24, !5
         30        ASSIGN                                                   !6, ~25
   29    31      > RETURN                                                   !6
   30    32*     > RETURN                                                   null

End of function comment_retrieve

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.99 ms | 1403 KiB | 14 Q