3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Download { protected $db; protected $client; public $download; public $downloads; public $free_downloads; public $downloads_count; public $info; public $file; public $status; function __construct($db,$client) { $this->db = $db; $this->client = $client; } public function getDownloads() { if($result = $this->db->query("SELECT * FROM downloads WHERE client_id='".$this->db->real_escape_string($this->client['id'])."' ORDER BY id DESC")) { $return = array(); while($a = $result->fetch_assoc()) { $return[] = $a; } $this->downloads_count = $result->num_rows; $this->downloads = $return; $result->free(); } else { die('Database error: ('.$this->db->errno.') '.$this->db->error); } } public function getFreeDownloads() { if($result = $this->db->query("SELECT * FROM products WHERE cat='freedownload' AND active='yes'")) { $return = array(); while($a = $result->fetch_assoc()) { $return[] = $a; } $this->free_downloads = $return; $result->free(); } else { die('Database error: ('.$this->db->errno.') '.$this->db->error); } } public function getSingleDownload($id) { if($result = $this->db->query("SELECT * FROM downloads WHERE id='".$this->db->real_escape_string($id)."' AND client_id='".$this->db->real_escape_string($this->client['id'])."'")) { if($result->num_rows == 1) { $this->status = 'OK'; $this->download = $result->fetch_array(); } else { $this->status = 'Kon de download niet vinden.'; } $result->free(); } else { $this->status = 'Database error: ('.$this->db->errno.') '.$this->db->error; } } public function getProduct($id) { if($result = $this->db->query("SELECT * FROM products WHERE id='".$this->db->real_escape_string($id)."' AND cat='download' AND active='yes' OR id='".$this->db->real_escape_string($id)."' AND cat='freedownload' AND active='yes'")) { if($result->num_rows == 1) { $this->info = $result->fetch_array(); $this->status = 'OK'; } else { $this->info = null; $this->status = 'NOK'; } $result->free(); } else { $this->status = 'NOK'; die('Database error: ('.$this->db->errno.') '.$this->db->error); } } public function addDownload($product_id,$key,$key2,$com='no',$uses) { if($this->db->query("INSERT INTO downloads (client_id,product_id,key1,key2,com_use,uses,created) VALUES ( '".$this->db->real_escape_string($this->client['id'])."', '".$this->db->real_escape_string($product_id)."', '".$this->db->real_escape_string($key1)."', '".$this->db->real_escape_string($key2)."', '".$this->db->real_escape_string($com)."', '".$this->db->real_escape_string(uses)."', NOW() )")) { $this->status = 'OK'; } else { $this->status = 'Database error: ('.$this->db->errno.') '.$this->db->error; } } public function updateDownload($id) { if($this->db->query("UPDATE downloads SET used=used+1 WHERE id='".$this->db->real_escape_string($id)."'")) { $this->status = 'OK'; } else { $this->status = 'Database error: ('.$this->db->errno.') '.$this->db->error; } } public function download($id, $free=true) { if($free == true) { $this->getProduct($id); if($this->status = 'OK') { if($this->info['price'] > 0 || $this->info['cat'] != 'freedownload') { $this->status = 'Kon download niet ophalen'; } else { $this->file['name'] = 'MijnSweetGroups_FreeDownload_'.$this->info['id'].'_'.uniqid().'.zip'; $this->file['download'] = '/home/sweet/domains/sweetgroups.net/DOWNLOADS/'.$this->info['download_map'].'/'; $this->file['replace'] = array( '{%WEBSITES%}' => 'UNLIMITED', '{%UPDATE%}' => $this->info['description'], '{%LICENSE_CAT%}' => 'FREE', '{%LICENSE_KEY1%}' => 'NONE', '{%LICENSE_KEY2%}' => 'NONE' ); } } else { $this->status = 'Kon download niet ophalen'; } } else { $this->getSingleDownload($id); if($this->status = 'OK') { if($this->download['used'] < $this->download['uses']) { $this->getProduct($this->download['product_id']); if($this->status = 'OK') { $this->file['id'] = $id; if($this->info['download_map'] == '') { $this->info['download_map'] = 'unknown'; } if($this->download['com_use'] == 'yes') { $this->file['name'] = 'MijnSweetGroups_Download_'.$this->download['id'].'_Com.zip'; $this->file['download'] = '/home/sweet/domains/sweetgroups.net/DOWNLOADS/'.$this->info['download_map'].'_com'; $this->file['replace'] = array( '{%WEBSITES%}' => '1', '{%UPDATE%}' => $this->info['description'], '{%LICENSE_CAT%}' => 'SINGLE COMMERCIAL', '{%LICENSE_KEY1%}' => $this->download['key1'], '{%LICENSE_KEY2%}' => $this->download['key2'] ); } else { $this->file['name'] = 'MijnSweetGroups_Download_'.$this->download['id'].'.zip'; $this->file['download'] = '/home/sweet/domains/sweetgroups.net/DOWNLOADS/'.$this->info['download_map'].'/'; $this->file['replace'] = array( '{%WEBSITES%}' => '1', '{%UPDATE%}' => $this->info['description'], '{%LICENSE_CAT%}' => 'SINGLE', '{%LICENSE_KEY1%}' => $this->download['key1'], '{%LICENSE_KEY2%}' => $this->download['key2'] ); } $this->status = 'OK'; } else { $this->status = 'Kon download niet ophalen'; } } else { $this->status = 'Download is al reeds gebruikt of download is niet gevonden.'; } } else { $this->status = 'Kon download niet ophalen'; } } } public function getStatus($status) { switch($status) { case 'notused': return '<span class="grey">Niet gebruikt</span>'; break; case 'canceled': return '<span class="red">Geannuleerd</span>'; break; case 'pending': return '<span class="orange">Wordt gemaakt</span>'; break; case 'delivered': return '<span class="green">Geleverd</span>'; break; default: return '<span class="grey">Onbekend</span>'; } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igPlS
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  202     0  E > > RETURN                                                   1

Class Download:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igPlS
function name:  __construct
number of ops:  7
compiled vars:  !0 = $db, !1 = $client
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        ASSIGN_OBJ                                               'db'
          3        OP_DATA                                                  !0
   16     4        ASSIGN_OBJ                                               'client'
          5        OP_DATA                                                  !1
   17     6      > RETURN                                                   null

End of function __construct

Function getdownloads:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 31
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 17
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 17
Branch analysis from position: 23
Branch analysis from position: 17
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/igPlS
function name:  getDownloads
number of ops:  40
compiled vars:  !0 = $result, !1 = $return, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_OBJ_R                                      ~3      'db'
          1        INIT_METHOD_CALL                                         ~3, 'query'
          2        FETCH_OBJ_R                                      ~4      'db'
          3        INIT_METHOD_CALL                                         ~4, 'real_escape_string'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $5      'client'
          6        FETCH_DIM_FUNC_ARG                               $6      $5, 'id'
          7        SEND_FUNC_ARG                                            $6
          8        DO_FCALL                                      0  $7      
          9        CONCAT                                           ~8      'SELECT+%2A+FROM+downloads+WHERE+client_id%3D%27', $7
         10        CONCAT                                           ~9      ~8, '%27+ORDER+BY+id+DESC'
         11        SEND_VAL_EX                                              ~9
         12        DO_FCALL                                      0  $10     
         13        ASSIGN                                           ~11     !0, $10
         14      > JMPZ                                                     ~11, ->31
   21    15    >   ASSIGN                                                   !1, <array>
   23    16      > JMP                                                      ->19
   24    17    >   ASSIGN_DIM                                               !1
         18        OP_DATA                                                  !2
   23    19    >   INIT_METHOD_CALL                                         !0, 'fetch_assoc'
         20        DO_FCALL                                      0  $14     
         21        ASSIGN                                           ~15     !2, $14
         22      > JMPNZ                                                    ~15, ->17
   27    23    >   FETCH_OBJ_R                                      ~17     !0, 'num_rows'
         24        ASSIGN_OBJ                                               'downloads_count'
         25        OP_DATA                                                  ~17
   28    26        ASSIGN_OBJ                                               'downloads'
         27        OP_DATA                                                  !1
   30    28        INIT_METHOD_CALL                                         !0, 'free'
         29        DO_FCALL                                      0          
         30      > JMP                                                      ->39
   32    31    >   FETCH_OBJ_R                                      ~20     'db'
         32        FETCH_OBJ_R                                      ~21     ~20, 'errno'
         33        CONCAT                                           ~22     'Database+error%3A+%28', ~21
         34        CONCAT                                           ~23     ~22, '%29+'
         35        FETCH_OBJ_R                                      ~24     'db'
         36        FETCH_OBJ_R                                      ~25     ~24, 'error'
         37        CONCAT                                           ~26     ~23, ~25
         38      > EXIT                                                     ~26
   34    39    > > RETURN                                                   null

End of function getdownloads

Function getfreedownloads:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
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: 8
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
Branch analysis from position: 8
Branch analysis from position: 19
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/igPlS
function name:  getFreeDownloads
number of ops:  28
compiled vars:  !0 = $result, !1 = $return, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   FETCH_OBJ_R                                      ~3      'db'
          1        INIT_METHOD_CALL                                         ~3, 'query'
          2        SEND_VAL_EX                                              'SELECT+%2A+FROM+products+WHERE+cat%3D%27freedownload%27+AND+active%3D%27yes%27'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                           ~5      !0, $4
          5      > JMPZ                                                     ~5, ->19
   38     6    >   ASSIGN                                                   !1, <array>
   40     7      > JMP                                                      ->10
   41     8    >   ASSIGN_DIM                                               !1
          9        OP_DATA                                                  !2
   40    10    >   INIT_METHOD_CALL                                         !0, 'fetch_assoc'
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                           ~9      !2, $8
         13      > JMPNZ                                                    ~9, ->8
   44    14    >   ASSIGN_OBJ                                               'free_downloads'
         15        OP_DATA                                                  !1
   46    16        INIT_METHOD_CALL                                         !0, 'free'
         17        DO_FCALL                                      0          
         18      > JMP                                                      ->27
   48    19    >   FETCH_OBJ_R                                      ~12     'db'
         20        FETCH_OBJ_R                                      ~13     ~12, 'errno'
         21        CONCAT                                           ~14     'Database+error%3A+%28', ~13
         22        CONCAT                                           ~15     ~14, '%29+'
         23        FETCH_OBJ_R                                      ~16     'db'
         24        FETCH_OBJ_R                                      ~17     ~16, 'error'
         25        CONCAT                                           ~18     ~15, ~17
         26      > EXIT                                                     ~18
   50    27    > > RETURN                                                   null

End of function getfreedownloads

Function getsingledownload:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 37
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igPlS
function name:  getSingleDownload
number of ops:  47
compiled vars:  !0 = $id, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
   53     1        FETCH_OBJ_R                                      ~2      'db'
          2        INIT_METHOD_CALL                                         ~2, 'query'
          3        FETCH_OBJ_R                                      ~3      'db'
          4        INIT_METHOD_CALL                                         ~3, 'real_escape_string'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $4      
          7        CONCAT                                           ~5      'SELECT+%2A+FROM+downloads+WHERE+id%3D%27', $4
          8        CONCAT                                           ~6      ~5, '%27+AND+client_id%3D%27'
          9        FETCH_OBJ_R                                      ~7      'db'
         10        INIT_METHOD_CALL                                         ~7, 'real_escape_string'
         11        CHECK_FUNC_ARG                                           
         12        FETCH_OBJ_FUNC_ARG                               $8      'client'
         13        FETCH_DIM_FUNC_ARG                               $9      $8, 'id'
         14        SEND_FUNC_ARG                                            $9
         15        DO_FCALL                                      0  $10     
         16        CONCAT                                           ~11     ~6, $10
         17        CONCAT                                           ~12     ~11, '%27'
         18        SEND_VAL_EX                                              ~12
         19        DO_FCALL                                      0  $13     
         20        ASSIGN                                           ~14     !1, $13
         21      > JMPZ                                                     ~14, ->37
   54    22    >   FETCH_OBJ_R                                      ~15     !1, 'num_rows'
         23        IS_EQUAL                                                 ~15, 1
         24      > JMPZ                                                     ~16, ->32
   55    25    >   ASSIGN_OBJ                                               'status'
         26        OP_DATA                                                  'OK'
   56    27        INIT_METHOD_CALL                                         !1, 'fetch_array'
         28        DO_FCALL                                      0  $19     
         29        ASSIGN_OBJ                                               'download'
         30        OP_DATA                                                  $19
         31      > JMP                                                      ->34
   58    32    >   ASSIGN_OBJ                                               'status'
         33        OP_DATA                                                  'Kon+de+download+niet+vinden.'
   61    34    >   INIT_METHOD_CALL                                         !1, 'free'
         35        DO_FCALL                                      0          
         36      > JMP                                                      ->46
   63    37    >   FETCH_OBJ_R                                      ~23     'db'
         38        FETCH_OBJ_R                                      ~24     ~23, 'errno'
         39        CONCAT                                           ~25     'Database+error%3A+%28', ~24
         40        CONCAT                                           ~26     ~25, '%29+'
         41        FETCH_OBJ_R                                      ~27     'db'
         42        FETCH_OBJ_R                                      ~28     ~27, 'error'
         43        CONCAT                                           ~29     ~26, ~28
         44        ASSIGN_OBJ                                               'status'
         45        OP_DATA                                                  ~29
   65    46    > > RETURN                                                   null

End of function getsingledownload

Function getproduct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 36
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 29
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 36
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/igPlS
function name:  getProduct
number of ops:  47
compiled vars:  !0 = $id, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   67     0  E >   RECV                                             !0      
   68     1        FETCH_OBJ_R                                      ~2      'db'
          2        INIT_METHOD_CALL                                         ~2, 'query'
          3        FETCH_OBJ_R                                      ~3      'db'
          4        INIT_METHOD_CALL                                         ~3, 'real_escape_string'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $4      
          7        CONCAT                                           ~5      'SELECT+%2A+FROM+products+WHERE+id%3D%27', $4
          8        CONCAT                                           ~6      ~5, '%27+AND+cat%3D%27download%27+AND+active%3D%27yes%27+OR+id%3D%27'
          9        FETCH_OBJ_R                                      ~7      'db'
         10        INIT_METHOD_CALL                                         ~7, 'real_escape_string'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $8      
         13        CONCAT                                           ~9      ~6, $8
         14        CONCAT                                           ~10     ~9, '%27+AND+cat%3D%27freedownload%27+AND+active%3D%27yes%27'
         15        SEND_VAL_EX                                              ~10
         16        DO_FCALL                                      0  $11     
         17        ASSIGN                                           ~12     !1, $11
         18      > JMPZ                                                     ~12, ->36
   69    19    >   FETCH_OBJ_R                                      ~13     !1, 'num_rows'
         20        IS_EQUAL                                                 ~13, 1
         21      > JMPZ                                                     ~14, ->29
   70    22    >   INIT_METHOD_CALL                                         !1, 'fetch_array'
         23        DO_FCALL                                      0  $16     
         24        ASSIGN_OBJ                                               'info'
         25        OP_DATA                                                  $16
   71    26        ASSIGN_OBJ                                               'status'
         27        OP_DATA                                                  'OK'
         28      > JMP                                                      ->33
   73    29    >   ASSIGN_OBJ                                               'info'
         30        OP_DATA                                                  null
   74    31        ASSIGN_OBJ                                               'status'
         32        OP_DATA                                                  'NOK'
   77    33    >   INIT_METHOD_CALL                                         !1, 'free'
         34        DO_FCALL                                      0          
         35      > JMP                                                      ->46
   79    36    >   ASSIGN_OBJ                                               'status'
         37        OP_DATA                                                  'NOK'
   80    38        FETCH_OBJ_R                                      ~22     'db'
         39        FETCH_OBJ_R                                      ~23     ~22, 'errno'
         40        CONCAT                                           ~24     'Database+error%3A+%28', ~23
         41        CONCAT                                           ~25     ~24, '%29+'
         42        FETCH_OBJ_R                                      ~26     'db'
         43        FETCH_OBJ_R                                      ~27     ~26, 'error'
         44        CONCAT                                           ~28     ~25, ~27
         45      > EXIT                                                     ~28
   82    46    > > RETURN                                                   null

End of function getproduct

Function adddownload:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 53
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igPlS
function name:  addDownload
number of ops:  63
compiled vars:  !0 = $product_id, !1 = $key, !2 = $key2, !3 = $com, !4 = $uses, !5 = $key1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   84     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      'no'
          4        RECV                                             !4      
   85     5        FETCH_OBJ_R                                      ~6      'db'
          6        INIT_METHOD_CALL                                         ~6, 'query'
   86     7        FETCH_OBJ_R                                      ~7      'db'
          8        INIT_METHOD_CALL                                         ~7, 'real_escape_string'
          9        CHECK_FUNC_ARG                                           
         10        FETCH_OBJ_FUNC_ARG                               $8      'client'
         11        FETCH_DIM_FUNC_ARG                               $9      $8, 'id'
         12        SEND_FUNC_ARG                                            $9
         13        DO_FCALL                                      0  $10     
         14        CONCAT                                           ~11     'INSERT+INTO+downloads+%28client_id%2Cproduct_id%2Ckey1%2Ckey2%2Ccom_use%2Cuses%2Ccreated%29+VALUES+%28%0A%09%09%09%27', $10
         15        CONCAT                                           ~12     ~11, '%27%2C%0A%09%09%09%27'
   87    16        FETCH_OBJ_R                                      ~13     'db'
         17        INIT_METHOD_CALL                                         ~13, 'real_escape_string'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0  $14     
         20        CONCAT                                           ~15     ~12, $14
         21        CONCAT                                           ~16     ~15, '%27%2C%0A%09%09%09%27'
   88    22        FETCH_OBJ_R                                      ~17     'db'
         23        INIT_METHOD_CALL                                         ~17, 'real_escape_string'
         24        SEND_VAR_EX                                              !5
         25        DO_FCALL                                      0  $18     
         26        CONCAT                                           ~19     ~16, $18
         27        CONCAT                                           ~20     ~19, '%27%2C%0A%09%09%09%27'
   89    28        FETCH_OBJ_R                                      ~21     'db'
         29        INIT_METHOD_CALL                                         ~21, 'real_escape_string'
         30        SEND_VAR_EX                                              !2
         31        DO_FCALL                                      0  $22     
         32        CONCAT                                           ~23     ~20, $22
         33        CONCAT                                           ~24     ~23, '%27%2C%0A%09%09%09%27'
   90    34        FETCH_OBJ_R                                      ~25     'db'
         35        INIT_METHOD_CALL                                         ~25, 'real_escape_string'
         36        SEND_VAR_EX                                              !3
         37        DO_FCALL                                      0  $26     
         38        CONCAT                                           ~27     ~24, $26
         39        CONCAT                                           ~28     ~27, '%27%2C%0A%09%09%09%27'
   91    40        FETCH_OBJ_R                                      ~29     'db'
         41        INIT_METHOD_CALL                                         ~29, 'real_escape_string'
         42        FETCH_CONSTANT                                   ~30     'uses'
         43        SEND_VAL_EX                                              ~30
         44        DO_FCALL                                      0  $31     
         45        CONCAT                                           ~32     ~28, $31
         46        CONCAT                                           ~33     ~32, '%27%2C%0A%09%09%09NOW%28%29%0A%09%09%29'
         47        SEND_VAL_EX                                              ~33
         48        DO_FCALL                                      0  $34     
         49      > JMPZ                                                     $34, ->53
   94    50    >   ASSIGN_OBJ                                               'status'
         51        OP_DATA                                                  'OK'
         52      > JMP                                                      ->62
   96    53    >   FETCH_OBJ_R                                      ~37     'db'
         54        FETCH_OBJ_R                                      ~38     ~37, 'errno'
         55        CONCAT                                           ~39     'Database+error%3A+%28', ~38
         56        CONCAT                                           ~40     ~39, '%29+'
         57        FETCH_OBJ_R                                      ~41     'db'
         58        FETCH_OBJ_R                                      ~42     ~41, 'error'
         59        CONCAT                                           ~43     ~40, ~42
         60        ASSIGN_OBJ                                               'status'
         61        OP_DATA                                                  ~43
   98    62    > > RETURN                                                   null

End of function adddownload

Function updatedownload:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igPlS
function name:  updateDownload
number of ops:  25
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  100     0  E >   RECV                                             !0      
  101     1        FETCH_OBJ_R                                      ~1      'db'
          2        INIT_METHOD_CALL                                         ~1, 'query'
          3        FETCH_OBJ_R                                      ~2      'db'
          4        INIT_METHOD_CALL                                         ~2, 'real_escape_string'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $3      
          7        CONCAT                                           ~4      'UPDATE+downloads+SET+used%3Dused%2B1+WHERE+id%3D%27', $3
          8        CONCAT                                           ~5      ~4, '%27'
          9        SEND_VAL_EX                                              ~5
         10        DO_FCALL                                      0  $6      
         11      > JMPZ                                                     $6, ->15
  102    12    >   ASSIGN_OBJ                                               'status'
         13        OP_DATA                                                  'OK'
         14      > JMP                                                      ->24
  104    15    >   FETCH_OBJ_R                                      ~9      'db'
         16        FETCH_OBJ_R                                      ~10     ~9, 'errno'
         17        CONCAT                                           ~11     'Database+error%3A+%28', ~10
         18        CONCAT                                           ~12     ~11, '%29+'
         19        FETCH_OBJ_R                                      ~13     'db'
         20        FETCH_OBJ_R                                      ~14     ~13, 'error'
         21        CONCAT                                           ~15     ~12, ~14
         22        ASSIGN_OBJ                                               'status'
         23        OP_DATA                                                  ~15
  106    24    > > RETURN                                                   null

End of function updatedownload

Function download:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 54
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 51
Branch analysis from position: 10
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 157
Branch analysis from position: 157
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
Branch analysis from position: 18
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 157
Branch analysis from position: 157
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 155
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 152
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 75, Position 2 = 149
Branch analysis from position: 75
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 85
Branch analysis from position: 82
2 jumps found. (Code = 43) Position 1 = 89, Position 2 = 118
Branch analysis from position: 89
1 jumps found. (Code = 42) Position 1 = 146
Branch analysis from position: 146
1 jumps found. (Code = 42) Position 1 = 151
Branch analysis from position: 151
1 jumps found. (Code = 42) Position 1 = 154
Branch analysis from position: 154
1 jumps found. (Code = 42) Position 1 = 157
Branch analysis from position: 157
Branch analysis from position: 118
1 jumps found. (Code = 42) Position 1 = 151
Branch analysis from position: 151
Branch analysis from position: 85
Branch analysis from position: 149
1 jumps found. (Code = 42) Position 1 = 154
Branch analysis from position: 154
Branch analysis from position: 152
1 jumps found. (Code = 42) Position 1 = 157
Branch analysis from position: 157
Branch analysis from position: 155
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/igPlS
function name:  download
number of ops:  158
compiled vars:  !0 = $id, !1 = $free
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  108     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <true>
  110     2        BOOL                                             ~2      !1
          3      > JMPZ                                                     ~2, ->54
  112     4    >   INIT_METHOD_CALL                                         'getProduct'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
  114     7        ASSIGN_OBJ                                       ~4      'status'
          8        OP_DATA                                                  'OK'
          9      > JMPZ                                                     ~4, ->51
  115    10    >   FETCH_OBJ_R                                      ~5      'info'
         11        FETCH_DIM_R                                      ~6      ~5, 'price'
         12        IS_SMALLER                                       ~7      0, ~6
         13      > JMPNZ_EX                                         ~7      ~7, ->18
         14    >   FETCH_OBJ_R                                      ~8      'info'
         15        FETCH_DIM_R                                      ~9      ~8, 'cat'
         16        IS_NOT_EQUAL                                     ~10     ~9, 'freedownload'
         17        BOOL                                             ~7      ~10
         18    > > JMPZ                                                     ~7, ->22
  116    19    >   ASSIGN_OBJ                                               'status'
         20        OP_DATA

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.31 ms | 1427 KiB | 13 Q