title: Assigning a function's result to a variable within a PHP class? OOP Weirdness
body: <p>I know you can assign a function's return value to a variable and use it, like this:</p>
  
  <pre><code>function standardModel()
  {
      return "Higgs Boson";   
  }
  
  $nextBigThing = standardModel();
  
  echo $nextBigThing;
  </code></pre>
  
  <p>So someone please tell me why the following doesn't work?  Or is it just not implemented yet? Am I missing something?</p>
  
  <pre><code>class standardModel
  {
      private function nextBigThing()
      {
          return "Higgs Boson";   
      }
  
      public $nextBigThing = $this-&gt;nextBigThing();   
  }
  
  $standardModel = new standardModel;
  
  echo $standardModel-&gt;nextBigThing; // get var, not the function directly
  </code></pre>
  
  <p>I know I <b>could</b> do this:</p>
  
  <pre><code>class standardModel
  {
      // Public instead of private
      public function nextBigThing()
      {
          return "Higgs Boson";   
      }
  }
  
  $standardModel = new standardModel;
  
  echo $standardModel-&gt;nextBigThing(); // Call to the function itself
  </code></pre>
  
  <p>But in my project's case, all of the information stored in the class are predefined public vars, <b>except</b> one of them, which needs to compute the value at runtime.</p>
  
  <p>I want it consistent so I nor any other developer using this project has to remember that one value has to be function call rather then a var call.</p>
  
  <p>But don't worry about my project, I'm mainly just wondering why the inconsistency within PHP's interpreter?</p>
  
  <p><i>Obviously, the examples are made up to simplify things. Please don't question "why" I need to put said function in the class. I don't need a lesson on proper OOP and this is just a proof of concept. Thanks!</i></p>