So I am finally able to start working on the code for the object relational mapping. While working through that code I noticed that in the User::Save method there is a conditional that never will be evaluated.
Below is the code that I am referring to ( see 164-165 of the English version of the book ).
PHP Code:
// ....
eval('$actualVal = &$this->' . $value . ';');
if (isset($actualVal)) {
if ((is_int($actualVal)) || ($actualVal == NULL)) {
// other code....
}
}
// ....
The second condition of $actualVal == NULL will never evaluate to true. This is because of the preceding isset() method call.
This is what the manual says about the isset() method.
http://us3.php.net/isset
So effectively it is extra code....
Please let me know if I am wrong or misunderstanding the code.