Re: $var::$static
| From: | Daniel Convissor | Date: | Sun, 27 May 2007 15:35:04 +0000 |
| Subject: | Re: $var::$static | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-29828@lists.php.net to get a copy of this message | ||
On Sat, May 26, 2007 at 01:50:04PM +0200, Bart de Boer wrote:
>
> class Base {
> public static $var = 'hello';
>
> public function someFunc() {
> echo self::$var; // Currently maps to Base::$var
> echo $this::$var; // Should map to Child::$var
Here, and throughout the example, you're mixing static and object
contexts. You need to pick one or the other and stick to it. If you
really want static, use child::$var.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409