note 11805 rejected from language.oop by tix

From: Date: Fri, 18 Jul 2003 07:53:30 +0000
Subject: note 11805 rejected from language.oop by tix
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52327@lists.php.net to get a copy of this message
Note Submitter: derek@idirect.com ---- 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 [Editor's note: it's working, but not in this you do. Use eval('$result=Math::mul(5, 6);') instead. There's also an example in the manual for eval().]

« previous php.notes (#52327) next »