Why can't I get access to my "incSessionCount" function inside my "newSession" function?
class Session {
private $_num_session = 0;
private function incSessionCount() {
$this->_num_session++;
}
public static function newSession($key, $value) {
if( !isset( $_SESSION[$key] ) ) {
$_SESSION[$key] = $value;
$this->incSessionCount();
return true;
} else {
return false;
}
}
}
I just played around, like making incSessionCount()
public
and so on...
And then I thought, that it must be even accessible, when it's set to private
...
It's possible, that I missed a useful article, which should have helped me, but finally I ended up asking.
So why doesn't this work?