Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10713 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8583 invoked by uid 1010); 22 Jun 2004 17:00:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8539 invoked from network); 22 Jun 2004 17:00:39 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 22 Jun 2004 17:00:39 -0000 Received: (qmail 15092 invoked from network); 22 Jun 2004 17:00:36 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 22 Jun 2004 17:00:36 -0000 Message-ID: <5.1.0.14.2.20040622173905.02007128@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 22 Jun 2004 17:39:26 +0100 To: Ard Biesheuvel ,internals@lists.php.net In-Reply-To: <20040621125401.81779.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] behaviour of static calls to regular methods From: andi@zend.com (Andi Gutmans) References: <20040621125401.81779.qmail@pb1.pair.com> Yeah for BC sake, but if you define the function's as static explicitly it won't work. At 01:54 PM 6/21/2004 +0200, Ard Biesheuvel wrote: >Is the fact that the following code works intentional ? > >class S { > function func() { > A::meth(); > } >} > >class A { > private $bar; > > function meth() { > $this->bar="bar"; > } > > function func() { > S::func(); > echo "$this->bar\n"; > > } >} > > >$a = new A; >$a->func(); > >... so A::$this is accessed through two static calls to different classes. > >-- >Ard > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php