title: Fatal error - Parse error: syntax error, unexpected ':', expecting - Wordpress
body: <p>I need your help.
  I'm trying to install ACF plugin and give me this error:</p>
  
  <p>Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/htb/mysite/wp-content/plugins/acf-for-woocommerce/vendor/catsplugins/cp-core/src/common/class-cp-util.php on line 23</p>
  
  <p>This is the line 23:</p>
  
  <pre><code>public static function pathToUrl(string $path): string {
  </code></pre>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;?php
  
  namespace CastPlugin;
  
  
  if (class_exists('CpUtil')) {
      return;
  }
  
  
  class CpUtil
  {
      public static function startsWith($haystack, $needle)
      {
          return strncmp($haystack, $needle, strlen($needle)) === 0;
      }
  
      public static function contains($haystack, $needle)
      {
          return strpos($haystack, $needle) !== false;
      }
  
      public static function pathToUrl(string $path): string {
          $ssl          = @$_SERVER['HTTPS'];
          $serverName   = $_SERVER['SERVER_NAME'];
          $documentRoot = $_SERVER['DOCUMENT_ROOT'];
          $correctPath  = $path;
  
          $uri          = str_replace($documentRoot, '', $correctPath);
  
          $protocol = $ssl === 'on' ? 'https' : 'http';
  
          return "$protocol://$serverName$uri";
      }
  }
  </code></pre>
  
  <p>Any idea how to solve this?
  Thank you. :)</p>