I have this class:
class TestClass
{
var $testvar;
public function __construct()
{
$this->$testvar = "Hullo";
echo($this->$testvar);
}
}
And this method for accessing:
function getCurrent()
{
$gen = new TestClass();
}
I get the following error:
Notice: Undefined variable: testvar in /Users/myuser/Sites/codebase/functions.php on line 28
Fatal error: Cannot access empty property in /Users/myuser/Sites/codebase/functions.php on line 28
What's going on?