note 87739 deleted from language.constants.predefined by danbrown

From: Date: Thu, 18 Dec 2008 20:47:16 +0000
Subject: note 87739 deleted from language.constants.predefined by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148334@lists.php.net to get a copy of this message
Note Submitter: jpfuentes2 at gmail dot com ---- In response to jamescol: We don't really require another constant. Instead use the function php5.3 introduces: get_called_class(); So your model would look like this: class Model { public static function find() { echo get_called_class(); } } class User extends Model { } User::find(); # User

« previous php.notes (#148334) next »