3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getCarrierByName($name) { $sql = 'SELECT * FROM `'._DB_PREFIX_.'carrier`'; $res = Db::getInstance()->executeS($sql); $id_carrier = intval(Configuration::get('PS_CARRIER_DEFAULT')); foreach($res as $c) { if(strstr(strtolower($name), strtolower($c['name']))) { $id_carrier = $c['id_carrier']; } } return $id_carrier; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l7CkK
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   1

Function getcarrierbyname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 33
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 33
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 32
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/l7CkK
function name:  getCarrierByName
number of ops:  36
compiled vars:  !0 = $name, !1 = $sql, !2 = $res, !3 = $id_carrier, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        FETCH_CONSTANT                                   ~5      '_DB_PREFIX_'
          2        CONCAT                                           ~6      'SELECT+%2A+FROM+%60', ~5
          3        CONCAT                                           ~7      ~6, 'carrier%60'
          4        ASSIGN                                                   !1, ~7
    4     5        INIT_STATIC_METHOD_CALL                                  'Db', 'getInstance'
          6        DO_FCALL                                      0  $9      
          7        INIT_METHOD_CALL                                         $9, 'executeS'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !2, $10
    5    11        INIT_STATIC_METHOD_CALL                                  'Configuration', 'get'
         12        SEND_VAL_EX                                              'PS_CARRIER_DEFAULT'
         13        DO_FCALL                                      0  $12     
         14        CAST                                          4  ~13     $12
         15        ASSIGN                                                   !3, ~13
    7    16      > FE_RESET_R                                       $15     !2, ->33
         17    > > FE_FETCH_R                                               $15, !4, ->33
    8    18    >   INIT_FCALL                                               'strstr'
         19        INIT_FCALL                                               'strtolower'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $16     
         22        SEND_VAR                                                 $16
         23        INIT_FCALL                                               'strtolower'
         24        FETCH_DIM_R                                      ~17     !4, 'name'
         25        SEND_VAL                                                 ~17
         26        DO_ICALL                                         $18     
         27        SEND_VAR                                                 $18
         28        DO_ICALL                                         $19     
         29      > JMPZ                                                     $19, ->32
    9    30    >   FETCH_DIM_R                                      ~20     !4, 'id_carrier'
         31        ASSIGN                                                   !3, ~20
    7    32    > > JMP                                                      ->17
         33    >   FE_FREE                                                  $15
   13    34      > RETURN                                                   !3
   14    35*     > RETURN                                                   null

End of function getcarrierbyname

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.31 ms | 1400 KiB | 17 Q