3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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';
Output for 4.3.0 - 7.1.0
ok