}
// edge
- if (preg_match('~edge/(\d{2}\.\d+)~i', $this->userAgent, $match)) {
+ if (preg_match('~edge?/([\d\.]+)~i', $this->userAgent, $match)) {
return 'Microsoft Edge '.$match[1];
}
+ // edge mobile
+ if (preg_match('~edga/([\d\.]+)~i', $this->userAgent, $match)) {
+ return 'Microsoft Edge Mobile '.$match[1];
+ }
+
// vivaldi
if (preg_match('~vivaldi/([\d\.]+)~i', $this->userAgent, $match)) {
return 'Vivaldi '.$match[1];
return 'Chrome Mobile '.(isset($match[2]) ? $match[2] : $match[1]);
}
- // chrome
- if (preg_match('~(?:chromium|chrome)/([\d\.]+)~i', $this->userAgent, $match)) {
- return 'Chrome '.$match[1];
- }
-
// kindle
if (preg_match('~kindle/([\d\.]+)~i', $this->userAgent, $match)) {
return 'Kindle '.$match[1];
return 'Safari Mobile '.$match[1];
}
+ // chrome
+ if (preg_match('~(?:chromium|chrome)/([\d\.]+)~i', $this->userAgent, $match)) {
+ return 'Chrome '.$match[1];
+ }
+
// safari
if (preg_match('~([\d\.]+) safari~i', $this->userAgent, $match)) {
return 'Safari '.$match[1];