note 87755 deleted from language.constants.predefined by thiago
| From: | thiago@php.net | Date: | Fri, 19 Dec 2008 18:51:35 +0000 |
| Subject: | note 87755 deleted from language.constants.predefined by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148357@lists.php.net to get a copy of this message | ||
Note Submitter: samkellett at gmail dot com
----
jamessocol, if you're running PHP 5.3 you can do this:
<?php
class Model {
static function find() {
echo get_called_class();
}
}
class Product extends Model {}
class User extends Model {}
Product::find();
// "Product"
User::find();
// "User"
?>