private function chromeWithMajorVersion($userAgent) {
		$start_idx = strpos($userAgent, 'Chrome');
		$end_idx = strpos($userAgent, '.', $start_idx);
		if ($end_idx === false) {
			return substr($userAgent, $start_idx);
		} else {
			return substr($userAgent, $start_idx, ($end_idx - $start_idx));
		}
	}
private function chromeWithMajorVersion($userAgent) {
		$start_idx = strpos($userAgent, 'Chrome');
		$end_idx = strpos($userAgent, '.', $start_idx);
		if ($end_idx === false) {
			return substr($userAgent, $start_idx);
		} else {
			return substr($userAgent, $start_idx, ($end_idx - $start_idx));
		}
	}
private function chromeWithMajorVersion ( $ userAgent ) { $ start_idx = strpos ( $ userAgent , 'Chrome' ) ; $ end_idx = strpos ( $ userAgent , '.' , $ start_idx ) ; if ( $ end_idx === false ) { return substr ( $ userAgent , $ start_idx ) ; } else { return substr ( $ userAgent , $ start_idx , ( $ end_idx - $ start_idx ) ) ; } }
Returns Google Chrome's Major version number
@param string $userAgent
@return string|int Version number
Returns Google Chrome s Major version number