Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7991 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22387 invoked by uid 1010); 19 Feb 2004 14:51:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22345 invoked from network); 19 Feb 2004 14:51:48 -0000 Received: from unknown (HELO shiva.mind.de) (212.42.230.204) by pb1.pair.com with SMTP; 19 Feb 2004 14:51:48 -0000 Received: from [192.168.1.105] (p508EB5F8.dip.t-dialin.net [80.142.181.248]) by shiva.mind.de (Postfix) with ESMTP id 5E55A97B58; Thu, 19 Feb 2004 15:51:32 +0100 (CET) Date: Thu, 19 Feb 2004 15:49:42 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <8745888843.20040219154942@marcus-boerger.de> To: Hartmut Holzgraefe Cc: Greg Beaver , hartmut@php-groupies.de, John Coggeshall , PHP Internals In-Reply-To: <40347BE5.2090405@php.net> References: <1077090830.30573.1.camel@coogle.localdomain> <40340579.7050309@chiaraquartet.net> <40347BE5.2090405@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Static weirdness.. From: helly@php.net (Marcus Boerger) Hello Hartmut, Thursday, February 19, 2004, 10:03:33 AM, you wrote: > Greg Beaver wrote: >> Hi, >> >> I agree that allowing $a->bar() with a static method is too confusing, >> and should not be allowed. However, the ability to call a static method >> of an object (variable class name, in other words), is invaluable. What >> if PHP simply allowed $object::staticMethod() syntax? > Why do i (as a user of a class) have to know whether a member function > is static or not? Having two different calling conventions is what > appears to be confusing to me ... A static and a non static member function are two absolute completley different things. Anyway calling a static method from an instance as $instance->staticmethod() or $instance::staticmethod() should be allowed. I guess the latter is what Lukas and Hartmut meant. -- Best regards, Marcus mailto:helly@php.net