Does the class definition include any __get() and/or __set() methods? (Note that those two method names begin with double underscores.) If so, then it may be using those "magic" methods to get/set one or more class variables.
If not, then it may be assuming that unspecified object variables are possibly being set (not very robust coding, IMO, but allowed), e.g.:
PHP Code:
<pre><?php
class Foo { public function bar() { if(isset($this->unnamed)) { return $this->unnamed; } return null; } }
$foo = new Foo(); $test = $foo->bar(); var_dump($test); $foo->unnamed = "This is a test."; $test = $foo->bar(); var_dump($test); ?></pre>
Output:
Code:
NULL
string(15) "This is a test."
Last edited by NogDog; 05-06-2012 at 11:55 AM.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks