3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'start'; define('_DB_PREFIX_',''); function recuperation_info_product_et_decrementation($reference, $qty, $isDeclinaison){ /* Fonction de récupèration et décrementation produit */ $product_infos = array('test'); $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); $result = true; if($result !== false) { //$product_infos = $result[0]; //decremente_stock($product_infos['id_product'], $qty, $reference, $table); exit(); } } return $product_infos; } print_r(recuperation_info_product_et_decrementation(1,2,true)); echo 'done';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b66fe
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'start'
    3     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 '_DB_PREFIX_'
          3        SEND_VAL                                                 ''
          4        DO_ICALL                                                 
   27     5        INIT_FCALL                                               'print_r'
          6        INIT_FCALL                                               'recuperation_info_product_et_decrementation'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 2
          9        SEND_VAL                                                 <true>
         10        DO_FCALL                                      0  $1      
         11        SEND_VAR                                                 $1
         12        DO_ICALL                                                 
   29    13        ECHO                                                     'done'
         14      > 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 = 25
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 11
filename:       /in/b66fe
function name:  recuperation_info_product_et_decrementation
number of ops:  28
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
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    5     3        ASSIGN                                                   !3, <array>
    6     4        ASSIGN                                                   !4, <array>
    8     5        TYPE_CHECK                                    4          !2
          6      > JMPZ                                                     ~10, ->11
    9     7    >   INIT_FCALL                                               'array_unshift'
          8        SEND_REF                                                 !4
          9        SEND_VAL                                                 'product'
         10        DO_ICALL                                                 
   12    11    > > FE_RESET_R                                       $12     !4, ->25
         12    > > FE_FETCH_R                                               $12, !5, ->25
   13    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
   15    20        ASSIGN                                                   !7, <true>
   16    21        TYPE_CHECK                                  1018          !7
         22      > JMPZ                                                     ~21, ->24
   19    23    > > EXIT                                                     
   12    24    > > JMP                                                      ->12
         25    >   FE_FREE                                                  $12
   23    26      > RETURN                                                   !3
   24    27*     > RETURN                                                   null

End of function recuperation_info_product_et_decrementation

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.41 ms | 1403 KiB | 20 Q