title: device-detector library doesn't work in php
body: <p>I'm trying to figure out what users device model so my application allow them only with thier own registered device and I found this device-detector library(<a href="https://github.com/matomo-org/device-detector" rel="nofollow noreferrer">https://github.com/matomo-org/device-detector</a>). My server do not use composer and php version is 5.3 . However when I try to use it it returns nothing and I have no clue. can someon help me with this? code is below</p>
  <pre><code>  &lt;?php
  ini_set('display_errors', '1');
  ini_set('display_startup_errors', '1');
  error_reporting(E_ALL);
  
  require_once '../lib/Mobile_Detect.php';  //another library
  
   include_once __DIR__ . '/spyc/Spyc.php'; //to use device-detector without composer
   include_once __DIR__ . '/device-detector/autoload.php'; 
  //  include_once __DIR__ . '/device-detector/DeviceDetector.php'; 
  
          
  use DeviceDetector\ClientHints;
  use DeviceDetector\DeviceDetector;
  use DeviceDetector\Parser\Device\AbstractDeviceParser;
  
  $detect = new Mobile_Detect;  
  //1 is mobile,2 is pc
  $devicetype = $detect-&gt;isMobile() ? 1 : 2;   
  
  //when it is mobile
  if($devicetype == 1){ 
      $devicemake = &quot;&quot;;     
      foreach($detect-&gt;getRules() as $name =&gt; $regex){ 
          if(substr($name, -2) == &quot;OS&quot;) break;      
          $check = $detect-&gt;{'is'.$name}(); 
          if($check) { 
               $devicemake = str_replace(&quot;Tablet&quot;,&quot;&quot;,$name);   //Tablet
               break; 
          } 
       }
  
      //device OS
       $deviceos = $detect-&gt;isiOS() ? &quot;iOS&quot; : ($detect-&gt;isAndroidOS() ? &quot;Android&quot; : &quot;ETC&quot;); 
       if($deviceos == &quot;iOS&quot;){ 
           $deviceosv = $detect-&gt;version(&quot;iOS&quot;);    //OS version(iOS)
       } else if ($deviceos == &quot;Android&quot;){ 
           $deviceosv = $detect-&gt;version(&quot;Android&quot;);  //OS info(Android)
       } else { 
           $deviceosv = $detect-&gt;version(&quot;Mobile&quot;);   //OS info(ETC)
       } 
  
       echo &quot;factory : &quot;.$devicemake.&quot;&lt;br&gt;&quot;;
          echo &quot;OS : &quot;.$deviceos.&quot;&lt;br&gt;&quot;;
          
          
          echo &quot;dd&quot;; // dd is written 
          $dd = new DeviceDetector($_SERVER['HTTP_USER_AGENT']);
          // nothing is written from here
          echo &quot;dd&quot;; 
          print_r($dd);
  
  echo &quot;dd&quot;;
  $result = $dd-&gt;parse();
  
  print_r($result);
  }elseif($devicetype ==2){
      echo &quot;PC&quot;;
      echo &quot;&lt;br&gt;&quot;;
      echo &quot;IP address : &quot;.$_SERVER['REMOTE_ADDR'];
  } 
  
  ?&gt;
  </code></pre>