Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21345 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87832 invoked by uid 1010); 27 Dec 2005 14:30:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87817 invoked from network); 27 Dec 2005 14:30:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Dec 2005 14:30:55 -0000 X-Host-Fingerprint: 194.109.193.120 unknown Linux 2.4/2.6 Received: from ([194.109.193.120:44171] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C0/E2-28258-F1051B34 for ; Tue, 27 Dec 2005 09:30:55 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 9E5071768D1 for ; Tue, 27 Dec 2005 15:30:55 +0100 (CET) Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (moulin [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20701-16 for ; Tue, 27 Dec 2005 15:30:53 +0100 (CET) Received: from [192.168.1.16] (bspr.xs4all.nl [194.109.161.228]) by mx1.moulin.nl (Postfix) with ESMTP id 5841417F2 for ; Tue, 27 Dec 2005 15:30:53 +0100 (CET) Message-ID: <43B15018.8070501@iamjochem.com> Date: Tue, 27 Dec 2005 15:30:48 +0100 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: php internals X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at moulin.nl Subject: $x instanceof __CLASS__ From: jochem@iamjochem.com (Jochem Maas) hi there, a quick question regarding whether the following is by design, because it causes a parse error (the code I tried out did occur within a class definition ! :-): if (!$field instanceof __CLASS__) { // do something } where as this obviously does work: $class = __CLASS__; if (!$field instanceof $class) { // do something } as does this: if (!$field instanceof self) { // do something } rgds, jochem