title: php class $this->regex not working
body: <p>I am having an issue inside my class where the <code>static private</code> variable is being used inside a function does not work. But it does work when the regex is directly inside it.</p>
  
  <pre><code>class Object{
    static private $regex = "/\w+|\-\d+/";
  
    //does not work (NULL)
    public function tokenize($text){
      preg_match_all($this-&gt;regex, $text, $matches);
      var_dump($matches);
    }
  
    //works
    public function tokenize($text){
      $regex = "/\w+|\-\d+/";
      preg_match_all($regex, $text, $matches);
      var_dump($matches);
    }
  }
  
  $o = New Object;
  $o-&gt;tokenize("test text -123");
  </code></pre>