note 11805 added to Classes and Objects
| From: | derek at idirect dot com | Date: | Wed, 07 Mar 2001 22:15:46 +0000 |
| Subject: | note 11805 added to Classes and Objects | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12012@lists.php.net to get a copy of this message | ||
Something curious to note...
It seems you cannot call a parent object method via an eval() call.
Example:
class Math
{
function mul($x, $y)
{
return ($x * $y);
}
}
$result = Math::mul(5, 6); # works
$result = eval("Math::mul(5, 6);"); # doesn't work
http://www.php.net/manual/en/language.oop.php