|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-05-30 20:34 UTC] joel at nextstudio dot com
Any chance in adding the Java equivalent of the getClass().getName() methods? Say maybe "get_current_class" and "get_current_object"? It'd be nice to see what the class and object names are within a method without having to explicitly pass the value to a constructor or method. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jun 16 16:00:01 2026 UTC |
Spending 2 minutes with a test script yields the following: class foo { function foo() { print get_class($this); } } $a = new foo; $this is get_current_object() get_class($this) is get_current_class()