Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35032 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67633 invoked by uid 1010); 30 Jan 2008 16:39:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67618 invoked from network); 30 Jan 2008 16:39:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2008 16:39:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:41086] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/CE-14302-948A0A74 for ; Wed, 30 Jan 2008 11:39:38 -0500 Received: from [192.168.3.87] (unknown [212.42.62.198]) by daylessday.org (Postfix) with ESMTP id 215F564015F; Wed, 30 Jan 2008 19:39:34 +0300 (MSK) Message-ID: <47A0A845.4040403@daylessday.org> Date: Wed, 30 Jan 2008 19:39:33 +0300 User-Agent: Thunderbird 2.0.0.9 (X11/20071114) MIME-Version: 1.0 To: Lars Strojny CC: php-dev References: <1201707040.4710.3.camel@localhost> In-Reply-To: <1201707040.4710.3.camel@localhost> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] A moving instance From: tony@daylessday.org (Antony Dovgal) On 30.01.2008 18:30, Lars Strojny wrote: > Hi, > > I've recently stumbled upon the following issue: when calling a > non-static function statically from a non-static class, the instance > magically moves to the called class. It throws a strict warning, but I > wonder if this is enough. The attached example produces "Foo". > > cu, Lars Is this what you mean? "$this is a reference to the calling object (usually the object to which the method belongs, but can be another object, if the method is called statically from the context of a secondary object)." http://www.php.net/manual/en/language.oop5.basic.php -- Wbr, Antony Dovgal