I am trying to move my site to PHP7.1 which did not give me major problems with the modifications that I use (I thought it would give more problems) I have only had problems with some that have to change the syntax but I am stuck with the following:
class uagent_info <== This is line 247
{
var $useragent = "";
var $httpaccept = "";
//Let's store values for quickly accessing the same info multiple times.
var $isIphone = 0; //Stores whether the device is an iPhone or iPod Touch.
var $isAndroidPhone = 0; //Stores whether the device is a (small-ish) Android phone or media player.
var $isTierTablet = 0; //Stores whether is the Tablet (HTML5-capable, larger screen) tier of devices.
var $isTierIphone = 0; //Stores whether is the iPhone tier of devices.
var $isTierRichCss = 0; //Stores whether the device can probably support Rich CSS, but JavaScript support is not assumed. (e.g., newer BlackBerry, Windows Mobile)
var $isTierGenericMobile = 0; //Stores whether it is another mobile device, which cannot be assumed to support CSS or JS (eg, older BlackBerry, RAZR)
// These strings cannot be used in isMobile because are way too generic
var $genericStrings = array(
'engineWebKit' => 'webkit',
'deviceMacPpc' => 'macintosh', //Used for disambiguation
'deviceWindows' => 'windows',
'devicePpc' => 'ppc', //Stands for PocketPC
'linux' => 'linux',
'engineOpera' => 'opera', //Popular browser
'deviceTablet' => 'tablet', //Generic term for slate and tablet devices
);
//Initialize some initial smartphone string variables.
var $mobileStrings = array(
'engineWebKit' => 'webkit',
'deviceIphone' => 'iphone',
'deviceIpod' => 'ipod',
'deviceIpad' => 'ipad',
'deviceMacPpc' => 'macintosh', //Used for disambiguation
'deviceAndroid' => 'android',
'deviceGoogleTV' => 'googletv',
'deviceXoom' => 'xoom', //Motorola Xoom
'deviceHtcFlyer' => 'htc_flyer', //HTC Flyer
'deviceNuvifone' => 'nuvifone', //Garmin Nuvifone
'deviceSymbian' => 'symbian',
'deviceS60' => 'series60',
'deviceS70' => 'series70',
'deviceS80' => 'series80',
'deviceS90' => 'series90',
'deviceWinPhone7' => 'windows phone os 7',
'deviceWinMob' => 'windows ce',
'deviceWindows' => 'windows',
'deviceIeMob' => 'iemobile',
'devicePpc' => 'ppc', //Stands for PocketPC
'enginePie' => 'wm5 pie', //An old Windows Mobile
'deviceBB' => 'blackberry',
'vndRIM' => 'vnd.rim', //Detectable when BB devices emulate IE or Firefox
'deviceBBStorm' => 'blackberry95', //Storm 1 and 2
'deviceBBBold' => 'blackberry97', //Bold 97x0 (non-touch)
'deviceBBBoldTouch' => 'blackberry 99', //Bold 99x0 (touchscreen)
'deviceBBTour' => 'blackberry96', //Tour
'deviceBBCurve' => 'blackberry89', //Curve2
'deviceBBTorch' => 'blackberry 98', //Torch
'deviceBBPlaybook' => 'playbook', //PlayBook tablet
'devicePalm' => 'palm',
'deviceWebOS' => 'webos', //For Palm's line of WebOS devices
'deviceWebOShp' => 'hpwos', //For HP's line of WebOS devices
'engineBlazer' => 'blazer', //Old Palm browser
'engineXiino' => 'xiino', //Another old Palm
'deviceKindle' => 'kindle', //Amazon Kindle, eInk one.
//Initialize variables for mobile-specific content.
'vndwap' => 'vnd.wap',
'wml' => 'wml',
//Initialize variables for other random devices and mobile browsers.
'deviceTablet' => 'tablet', //Generic term for slate and tablet devices
'deviceBrew' => 'brew',
'deviceDanger' => 'danger',
'deviceHiptop' => 'hiptop',
'devicePlaystation' => 'playstation',
'deviceNintendoDs' => 'nitro',
'deviceNintendo' => 'nintendo',
'deviceWii' => 'wii',
'deviceXbox' => 'xbox',
'deviceArchos' => 'archos',
'engineOpera' => 'opera', //Popular browser
'engineNetfront' => 'netfront', //Common embedded OS browser
'engineUpBrowser' => 'up.browser', //common on some phones
'engineOpenWeb' => 'openweb', //Transcoding by OpenWave server
'deviceMidp' => 'midp', //a mobile Java technology
'uplink' => 'up.link',
'engineTelecaQ' => 'teleca q', //a modern feature phone browser
'devicePda' => 'pda', //some devices report themselves as PDAs
'mini' => 'mini', //Some mobile browsers put 'mini' in their names.
'mobile' => 'mobile', //Some mobile browsers put 'mobile' in their user agent strings.
'mobi' => 'mobi', //Some mobile browsers put 'mobi' in their user agent strings.
//Use Maemo, Tablet, and Linux to test for Nokia's Internet Tablets.
'maemo' => 'maemo',
'linux' => 'linux',
'qtembedded' => 'qt embedded', //for Sony Mylo and others
'mylocom2' => 'com2', //for Sony Mylo also
//In some UserAgents, the only clue is the manufacturer.
'manuSonyEricsson' => 'sonyericsson',
'manuericsson' => 'ericsson',
'manuSamsung1' => 'sec-sgh',
'manuSony' => 'sony',
'manuHtc' => 'htc', //Popular Android and WinMo manufacturer
//In some UserAgents, the only clue is the operator.
'svcDocomo' => 'docomo',
'svcKddi' => 'kddi',
'svcVodafone' => 'vodafone',
);
I mark this: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; uagent_info has a deprecated constructor in /home/public_html/foro/Sources/Subs-mobile.php on line 247
I understand this in the form of declaring the variable will not have more compatibility with the new branch but I tried to implement it without success, I was giving code error when trying how it is in the php documentation or it does not detect the cellular part. Any ideas where I can look or can you help me with this? Thank you for reading.
Regards!