Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29828 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64067 invoked by uid 1010); 27 May 2007 15:35:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64046 invoked from network); 27 May 2007 15:35:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2007 15:35:10 -0000 Authentication-Results: pb1.pair.com header.from=danielc@analysisandsolutions.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danielc@analysisandsolutions.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain analysisandsolutions.com from 166.84.1.73 cause and error) X-PHP-List-Original-Sender: danielc@analysisandsolutions.com X-Host-Fingerprint: 166.84.1.73 mail2.panix.com Received: from [166.84.1.73] ([166.84.1.73:50164] helo=mail2.panix.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/36-48576-B25A9564 for ; Sun, 27 May 2007 11:35:08 -0400 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail2.panix.com (Postfix) with ESMTP id 5D1BF3485C for ; Sun, 27 May 2007 11:35:04 -0400 (EDT) Received: (from analysis@localhost) by panix5.panix.com (8.11.6p3/8.8.8/PanixN1.1) id l4RFZ4922170 for internals@lists.php.net; Sun, 27 May 2007 11:35:04 -0400 (EDT) Date: Sun, 27 May 2007 11:35:04 -0400 To: PHP Internals List Message-ID: <20070527153504.GA16445@panix.com> References: <2C.70.31507.8DE18564@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2C.70.31507.8DE18564@pb1.pair.com> User-Agent: Mutt/1.5.10i Subject: Re: [PHP-DEV] $var::$static From: danielc@analysisandsolutions.com (Daniel Convissor) 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