title: PHP class object as other class parameter
body: <p>I have a problem, I need to rewrite my c++ program in PHP, I have very little experience.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>class Variable {
      public $power;
      public $shortcut;
      public $value;
      public function __construct($a, $b, $c) {
          $this-&gt;shortcut=$a;
          $this-&gt;value=$b;
          $this-&gt;power=$c;
      }
  };
  
  class Formula {
      Variable var1;
      Variable var2;
      Variable var3;
      $sign;
  };
  </code></pre>
  
  <p>Formula class have 3 parameters which are objects of Variable class, How do I write something like that in PHP?</p>