I may be missing something, but what is the point of this?
function __get($somepointer) {
foreach($this->attribute as $key => $value)
echo $key. '=>' .$value;
}
Think about your code. Why are you requiring the $somepointer variable, but not using it in that function? But that's not as important as what is next:
It has something to do with each of these lines:
$leslie->('Hair', 'blond');
$leslie->('Eyes', 'green');
$leslie->('Height', '5 10');
$leslie->('Weight', '120');
/*
Perhaps it should look a little something like:
*/
$leslie['Eyes'] = 'green';
$leslie['Height'] = '5 10';
$leslie['Weight'] = '120';
/*
OR
*/
$leslie->__set('Eyes', 'green');'
$leslie->__set('Height', '5 10');
$leslie->__set('Weight', '120');
You need to define what that is. Is it an array, a variable, is it being sent to a function?
That's the error. How did i figure that out? I counted to line 23, and then looked at it. Hopefully this is just a Doh! moment for you; however, if not, it's a learning experience.
~Brett