Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3309 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1034 invoked from network); 8 Jul 2003 21:11:51 -0000 Received: from unknown (HELO mail.gettcomm.com) (12.107.238.2) by pb1.pair.com with SMTP; 8 Jul 2003 21:11:51 -0000 Received: from localhost (localhost [127.0.0.1]) by mail.gettcomm.com (Postfix) with ESMTP id A8BF85746 for ; Tue, 8 Jul 2003 16:12:56 -0500 (CDT) Received: from fluoro.gettcomm.int (fluoro.gettcomm.int [192.168.2.188]) by mail.gettcomm.com (Postfix) with SMTP id 5C1E25797 for ; Tue, 8 Jul 2003 16:12:54 -0500 (CDT) Date: Tue, 8 Jul 2003 16:11:49 -0500 To: internals@lists.php.net Message-ID: <20030708161149.01897345.phil@gettcomm.com> Organization: gett communications X-Mailer: Sylpheed version 0.9.0 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS 0.3.12 Subject: Inheritance and Static Methods From: phil@gettcomm.com (Phil Dier) Is there a function that can be used to retrieve the name of a statically called child class from within an inherited method? debug_backtrace() works for this purpose, but I've seen people say that it is slow. Consider the example code below. Is this a planned feature for PHP 5, or could this possibly make it into 4.x? What options do I have? test_backtrace(); ?> Output Looks Like: ** static: class pre: a class bt: b class get_class: ** object: class pre: a class bt: b class get_class: b Perhaps get_class() could return the expected class name when called without arguements? -- Phil Dier gett communications gettlabs, inc.