note 86681 deleted from language.constants.predefined by danbrown

From: Date: Wed, 29 Oct 2008 17:37:43 +0000
Subject: note 86681 deleted from language.constants.predefined by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145939@lists.php.net to get a copy of this message
Note Submitter: -no.spam-frase at cs dot wisc dot edu ---- me at jamessocol dot com: couldn't you use get_called_class() for that? i.e. <?php class Model { public static function find() { echo get_called_class(); } } class Product extends Model {} class User extends Model {} Product::find(); // "Product" User::find(); // "User" ?>

« previous php.notes (#145939) next »