Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13857 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41295 invoked by uid 1010); 15 Nov 2004 02:28:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38973 invoked from network); 15 Nov 2004 02:28:33 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.204) by pb1.pair.com with SMTP; 15 Nov 2004 02:28:32 -0000 Received: by wproxy.gmail.com with SMTP id 50so923924wri for ; Sun, 14 Nov 2004 18:28:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=OEqlPIcnt4wQuYbZSEpX1w3Q6+lIQaNvL4gEY84SHKj7QzzxvYrRT1Lj/Z3cqBDz/BCAX9G5DmpSoMdvDdON8KshFJZzHk2t/xShwx6xzcLn/xMdWDhMvIZkqBo0/O6ThoD9N2ewB/DSOECXEjpw75a/YSesnyCTBAfBp2cEjMc= Received: by 10.54.38.45 with SMTP id l45mr334451wrl; Sun, 14 Nov 2004 18:28:31 -0800 (PST) Received: by 10.54.32.26 with HTTP; Sun, 14 Nov 2004 18:28:31 -0800 (PST) Message-ID: <5c28747204111418283969a100@mail.gmail.com> Date: Sun, 14 Nov 2004 20:28:31 -0600 Reply-To: Jason Sweat To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: debug_backtrace and static methods. From: jason.sweat@gmail.com (Jason Sweat) I am not sure if this should be considered a bug. If it should be, I would be happy to report it. I did a search for debug_backtrace and static and found no hits in the bug database. If you call a static method from inside of another classes method, debug_backtrace reports the calls as being a method of the hosting object's class, not the static call. IMO, it should still be reported as a static function call, even if it happens to be invoked from within a class. Here is a simple test case: class S { function bt() { $bt = debug_backtrace(); echo $bt[0]['class'], $bt[0]['type'], $bt[0]['function'], "\n"; } } class C extends S {} class O { function t() { S::bt(); } } //okay S::bt S::bt(); //also okay C->bt $o = new C; $o->bt(); // problem? reports O->bt, but I think it should have been S::bt $o2 = new O; $o2->t(); Is this perhaps caused by confusion related to the scope resolution operator between the static call, and trying to resolve parent:: inheritance? Regards, Jason -- http://blog.casey-sweat.us/