Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36024 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48002 invoked from network); 6 Mar 2008 23:02:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2008 23:02:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=et@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=et@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 62.75.137.136 as permitted sender) X-PHP-List-Original-Sender: et@php.net X-Host-Fingerprint: 62.75.137.136 fuer-et.de Linux 2.5 (sometimes 2.4) (4) Received: from [62.75.137.136] ([62.75.137.136:39891] helo=eve.fuer-et.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/83-32159-01870D74 for ; Thu, 06 Mar 2008 18:02:41 -0500 Received: from edea.local (mainau.mis.informatik.tu-darmstadt.de [130.83.165.199]) by eve.fuer-et.de (Postfix) with ESMTP id E28361C59C9C for ; Thu, 6 Mar 2008 23:02:32 +0000 (UTC) To: internals@lists.php.net Date: Fri, 7 Mar 2008 00:03:27 +0100 User-Agent: KMail/1.9.7 References: <7d5a202f0803061338jcd4fae3pecd559728443386d@mail.gmail.com> <6A.52.32159.68570D74@pb1.pair.com> In-Reply-To: <6A.52.32159.68570D74@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200803070003.27344.et@php.net> Subject: Re: [PHP-DEV] Re: having fun with $this From: et@php.net (Stefan Walk) On Thursday 06 March 2008 23:51:47 Edward Z. Yang wrote: > These examples don't cause any problems because they're not in the > object context, so $this is just another, ordinary variable. If you > include'd the files inside something like: > > class Foo { > public function bar() { > include 'this-test.php'; > } > } > > there should be an error php -r 'class A { function __construct() { $this+=41; var_dump($this); }} new A;' int(42) "should" is the right word here ;) Regards, Stefan