note 13821 deleted from keyword.paamayim-nekudotayim by didou
| From: | didou@php.net | Date: | Tue, 03 Jun 2003 22:20:53 +0000 |
| Subject: | note 13821 deleted from keyword.paamayim-nekudotayim by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49667@lists.php.net to get a copy of this message | ||
Note Submitter: robinv@ecosse.net
----
Correction, my previous note should read:
Variable Class Names (PHP 4.05):
class A {
function example() {
return 'example!';
}
}
$class = 'A';
$instance = 'a';
$a = new A;
// While you can do this in PHP4:
print ${$instance}->example();
// The parser doesn't seem to like this:
print ${'class'}::example();
// A workaround is to use eval()
print eval("return $class::example();");