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

End of function recuperation_info_product_et_decrementation

Function recuperation_idproduct_idproductattribute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MWi8A
function name:  recuperation_idProduct_idProductAttribute
number of ops:  42
compiled vars:  !0 = $reference, !1 = $product_infos, !2 = $query, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        ASSIGN                                                   !1, <array>
   29     2        FETCH_CONSTANT                                   ~5      '_DB_PREFIX_'
          3        CONCAT                                           ~6      'SELECT+%2A+FROM+%60', ~5
          4        CONCAT                                           ~7      ~6, 'product%60+WHERE+%60reference%60+%3D+%22'
          5        INIT_FCALL_BY_NAME                                       'pSQL'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $8      
          8        CONCAT                                           ~9      ~7, $8
          9        CONCAT                                           ~10     ~9, '%22%3B'
         10        ASSIGN                                                   !2, ~10
   30    11        INIT_STATIC_METHOD_CALL                                  'Db', 'getInstance'
         12        DO_FCALL                                      0  $12     
         13        INIT_METHOD_CALL                                         $12, 'executeS'
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0  $13     
         16        ASSIGN                                                   !3, $13
   31    17        FETCH_DIM_R                                      ~16     !3, 0
         18        FETCH_DIM_R                                      ~17     ~16, 'id_product'
         19        ASSIGN_DIM                                               !1, 'id_product'
         20        OP_DATA                                                  ~17
   33    21        FETCH_CONSTANT                                   ~18     '_DB_PREFIX_'
         22        CONCAT                                           ~19     'SELECT+%2A+FROM+%60', ~18
         23        CONCAT                                           ~20     ~19, 'product_attribute%60+WHERE+%60reference%60+%3D+%22'
         24        INIT_FCALL_BY_NAME                                       'pSQL'
         25        SEND_VAR_EX                                              !0
         26        DO_FCALL                                      0  $21     
         27        CONCAT                                           ~22     ~20, $21
         28        CONCAT                                           ~23     ~22, '%22%3B'
         29        ASSIGN                                                   !2, ~23
   34    30        INIT_STATIC_METHOD_CALL                                  'Db', 'getInstance'
         31        DO_FCALL                                      0  $25     
         32        INIT_METHOD_CALL                                         $25, 'executeS'
         33        SEND_VAR_EX                                              !2
         34        DO_FCALL                                      0  $26     
         35        ASSIGN                                                   !3, $26
   35    36        FETCH_DIM_R                                      ~29     !3, 0
         37        FETCH_DIM_R                                      ~30     ~29, 'id_product_attribute'
         38        ASSIGN_DIM                                               !1, 'id_product_attribute'
         39        OP_DATA                                                  ~30
   37    40      > RETURN                                                   !1
   38    41*     > RETURN                                                   null

End of function recuperation_idproduct_idproductattribute

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.2 ms | 1404 KiB | 15 Q