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

Function getcarrierbyname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O4p6f
function name:  getCarrierByName
number of ops:  17
compiled vars:  !0 = $name, !1 = $sql, !2 = $res, !3 = $id_carrier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        FETCH_CONSTANT                                   ~4      '_DB_PREFIX_'
          2        CONCAT                                           ~5      'SELECT+%2A+FROM+%60', ~4
          3        CONCAT                                           ~6      ~5, 'carrier%60'
          4        ASSIGN                                                   !1, ~6
    5     5        INIT_STATIC_METHOD_CALL                                  'Db', 'getInstance'
          6        DO_FCALL                                      0  $8      
          7        INIT_METHOD_CALL                                         $8, 'executeS'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
    6    11        INIT_STATIC_METHOD_CALL                                  'Configuration', 'get'
         12        SEND_VAL_EX                                              'PS_CARRIER_DEFAULT'
         13        DO_FCALL                                      0  $11     
         14        CAST                                          4  ~12     $11
         15        ASSIGN                                                   !3, ~12
   16    16      > RETURN                                                   null

End of function getcarrierbyname

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.38 ms | 1393 KiB | 13 Q