title: How to define a static variable inside a __construct with an array from outside the class?
body: <p>My brain is running out of power and with it my skill to search (I didn't find an 100% answer to what I'm looking for). That being said, I have a class inside which is an empty static variable $title which I'd need to define inside __construct, but it can't seem to get it via global. Let's just show some code, shall we?</p>
  
  <pre><code>$arg = array( my data is here );
  class Article
  {
      static $title;
  
      public function __construct()
      {
          global $arg;
          self::$title = $arg['title'];
      }
  
      public static function title()
      {
          return self::$title;
      }
  }
  </code></pre>
  
  <p>My end goal would be to simply do</p>
  
  <pre><code>echo Article::title();
  </code></pre>
  
  <p>to get the title of the article. But as I previously mentioned, I have no such luck. All help is appreciated.</p>