Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10676 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81824 invoked by uid 1010); 21 Jun 2004 12:54:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81780 invoked by uid 1007); 21 Jun 2004 12:54:01 -0000 Message-ID: <20040621125401.81779.qmail@pb1.pair.com> To: internals@lists.php.net Date: Mon, 21 Jun 2004 14:54:02 +0200 User-Agent: Mozilla Thunderbird 0.5 (X11/20040306) X-Accept-Language: en-us, en MIME-Version: 1.0 X-Enigmail-Version: 0.83.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.126.21.70 Subject: behaviour of static calls to regular methods From: abies@php.net (Ard Biesheuvel) 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