i came by some php code where the developer who wrote it is being a little contradictory i think. so here is the code he wrote:
if ($this->SQL !== null && $this->SQLState === self::STATE_CLEAN)
return $this->SQL;
where the SQLState and the STATE_CLEAN are defined like this:
class someClass {
const STATE_CLEAN = 1;
private $SQLState = self::STATE_CLEAN;
}
so you can see that for some class attributes he uses $this and for some he uses self:: and i can't understand why. can any one help. Thanks