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; } echo 'done';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eiXoD
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'start'
   28     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/eiXoD
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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.42 ms | 1404 KiB | 16 Q