title: PHP 7: SessionHandlerInterface::read(string $session_id): string must be compatible with SessionHandlerInterface::read($key)
body: <p>with the following code under PHP 7.1</p>
  
  <pre><code>class MySqlSessionHandler implements \SessionHandlerInterface   {
       public function read(string $session_id) : string  { ... }
  }
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Fatal error: Declaration of Sessions\MySqlSessionHandler::read(string
    $session_id): string must be compatible with
    SessionHandlerInterface::read($key)</p>
  </blockquote>
  
  <p>When I remove the type declaration "string" instead like </p>
  
  <pre><code>public function read($session_id) : string  { ... }
  </code></pre>
  
  <p>no exception is thrown. The same is happening with all other SessionHandlerInterface functions. Reading PHP documentation type string should be correct.</p>
  
  <p>What is wrong ?</p>