I have a problem, I need to rewrite my c++ program in PHP, I have very little experience.
Here is my code:
class Variable {
public $power;
public $shortcut;
public $value;
public function __construct($a, $b, $c) {
$this->shortcut=$a;
$this->value=$b;
$this->power=$c;
}
};
class Formula {
Variable var1;
Variable var2;
Variable var3;
$sign;
};
Formula class have 3 parameters which are objects of Variable class, How do I write something like that in PHP?
$sign? Also, your forumla variables should have$in front of them:Variable $var1;