3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'start'; function recuperation_info_product_et_decrementation($reference, $qty, $isDeclinaison){ /* Fonction de récupèration et décrementation produit */ $product_infos = array(); $tables = array('product_attribute'); if($isDeclinaison === false) { array_unshift($tables, 'product'); } foreach($tables as $table) { $query = 'SELECT * FROM `'._DB_PREFIX_.$table.'` WHERE `reference` = "'.$reference.'";'; $result = Db::getInstance()->executeS($query); if($result !== false) { $product_infos = $result[0]; decremente_stock($product_infos['id_product'], $qty, $reference, $table); //break; } } return $product_infos; } echo 'done';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oJkTk
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'start'
   27     1        ECHO                                                     'done'
          2      > RETURN                                                   1

Function recuperation_info_product_et_decrementation:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 39
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 39
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 38
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 38
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 11
filename:       /in/oJkTk
function name:  recuperation_info_product_et_decrementation
number of ops:  42
compiled vars:  !0 = $reference, !1 = $qty, !2 = $isDeclinaison, !3 = $product_infos, !4 = $tables, !5 = $table, !6 = $query, !7 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        ASSIGN                                                   !3, <array>
    5     4        ASSIGN                                                   !4, <array>
    7     5        TYPE_CHECK                                    4          !2
          6      > JMPZ                                                     ~10, ->11
    8     7    >   INIT_FCALL                                               'array_unshift'
          8        SEND_REF                                                 !4
          9        SEND_VAL                                                 'product'
         10        DO_ICALL                                                 
   11    11    > > FE_RESET_R                                       $12     !4, ->39
         12    > > FE_FETCH_R                                               $12, !5, ->39
   12    13    >   FETCH_CONSTANT                                   ~13     '_DB_PREFIX_'
         14        CONCAT                                           ~14     'SELECT+%2A+FROM+%60', ~13
         15        CONCAT                                           ~15     ~14, !5
         16        CONCAT                                           ~16     ~15, '%60+WHERE+%60reference%60+%3D+%22'
         17        CONCAT                                           ~17     ~16, !0
         18        CONCAT                                           ~18     ~17, '%22%3B'
         19        ASSIGN                                                   !6, ~18
   13    20        INIT_STATIC_METHOD_CALL                                  'Db', 'getInstance'
         21        DO_FCALL                                      0  $20     
         22        INIT_METHOD_CALL                                         $20, 'executeS'
         23        SEND_VAR_EX                                              !6
         24        DO_FCALL                                      0  $21     
         25        ASSIGN                                                   !7, $21
   14    26        TYPE_CHECK                                  1018          !7
         27      > JMPZ                                                     ~23, ->38
   15    28    >   FETCH_DIM_R                                      ~24     !7, 0
         29        ASSIGN                                                   !3, ~24
   16    30        INIT_FCALL_BY_NAME                                       'decremente_stock'
         31        CHECK_FUNC_ARG                                           
         32        FETCH_DIM_FUNC_ARG                               $26     !3, 'id_product'
         33        SEND_FUNC_ARG                                            $26
         34        SEND_VAR_EX                                              !1
         35        SEND_VAR_EX                                              !0
         36        SEND_VAR_EX                                              !5
         37        DO_FCALL                                      0          
   11    38    > > JMP                                                      ->12
         39    >   FE_FREE                                                  $12
   21    40      > RETURN                                                   !3
   22    41*     > RETURN                                                   null

End of function recuperation_info_product_et_decrementation

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.87 ms | 1392 KiB | 15 Q