Re: $class::bar() yields parse error
| From: | Zeev Suraski | Date: | Mon, 29 Oct 2001 10:57:49 +0000 |
| Subject: | Re: $class::bar() yields parse error | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69273@lists.php.net to get a copy of this message | ||
At 11:33 29/10/2001, Sebastian Bergmann wrote:
Calling static methods on 'variable' classes currently yields a parse error:Yes, currently this has to be resolved in compile time. This may (probably will) change in the Engine 2.0. Zeev<?php class foo { function bar() { echo 'foobar'; } }$class = 'foo'; $class::bar(); ?>I think it would be great if the above syntax would be possible. Any technical obstacles, comments?