title: PHP5.6 - Error Access to undeclared static property
body: <p>In my project I get this error: </p>
  
  <blockquote>
    <p>Access to undeclared static property.</p>
  </blockquote>
  
  <p>The code apparently is correct:</p>
  
  <pre><code>&lt;?php
  class Session {
      private static $sessionStarted = false;
  
      public static function init()
      {
          if (session_status() !== PHP_SESSION_ACTIVE) {
              session_start();
          }
  
          if (session_status() === PHP_SESSION_ACTIVE) {
              self::$sessionStarted = true; // &lt;-- this line causes the error!!!
          }
      }
  </code></pre>
  
  <p>My environment: Windows 10, Windows Bash and Docker php:5.6-apache</p>