RE: Possibly the weirdest bug fix. 06-03-2014, 12:25 PM
#6
(06-03-2014, 10:34 AM)cr33pyguy Wrote: They'll grow giant, and roll over you. And then they'll eat smashed humans with grass sauce.
OT: I've done only a small amount of PHP, so excuse my confusion, but what exactly does the operator -> do?
is it similar to Java's .add() ?
Well, $this is referring to the parent class, -> is used for referencing variables and functions within the class.
For example, in the code above, I have the variable/array called $cart, I'm giving the variable $potato the value stored in the $cart variable.
PHP Code:
$potato = $this->cart;
For some better explanations, I suggest checking out their documentation.





![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)