how to access the elements of a class in php using object code example
Example: class php
<?php
class Foo {
public $aMemberVar = 'aMemberVar Member Variable';
public $aFuncName = 'aMemberFunc';
function aMemberFunc() {
print 'Inside `aMemberFunc()`';
}
}
$foo = new Foo;
function getVarName()
{
return 'aFuncName';
}
print $foo->{$foo->{getVarName()}}();