Unexpected behaviuor with __CLASS__

From: Date: Wed, 16 Jun 2004 09:49:31 +0000
Subject: Unexpected behaviuor with __CLASS__
Groups: php.general 
Request: Send a blank email to php-general+get-188383@lists.php.net to get a copy of this message
Hi list, on RedHat with PHP 4.3.6 the following code produces 'test' - I'm expecting 'test2': class test { function printClass() { echo __CLASS__; } } class test2 extends test { } test2::printClass(); I would like to get/echo the name of the class calling the method - in my case test2. Any ideas? Thanks and best regards, Torsten Roehr

« previous php.general (#188383) next »