Mobile_Detect::version
Check the version of the given property in the User-Agent.
Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
Signature
public function version(string
$propertyName,
[string
$type = self::VERSION_TYPE_STRING] )
Parameters
$propertyName
— string- The name of the property. See self::getProperties() array
keys for all possible properties. $type
— string- Either self::VERSION_TYPE_STRING to get a string value or
self::VERSION_TYPE_FLOAT indicating a float value. This parameter
is optional and defaults to self::VERSION_TYPE_STRING. Passing an
invalid parameter will default to the this type as well.
Returns
- string|float
- The version of the property we are trying to extract.