note 74514 deleted from function.get-class by cmb
| From: | cmb@php.net | Date: | Wed, 30 Nov 2016 16:33:10 +0000 |
| Subject: | note 74514 deleted from function.get-class by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207757@lists.php.net to get a copy of this message | ||
Note Submitter: Kerry Kobashi
----
It should be noted that class names are represented in lowercase under PHP 4.x.
class MyClass {
function MyClass() {
}
function ShowClass() {
echo get_class($this);
}
}
$p = new MyClass();
$p->ShowClass();
Displays:
myclass
If you serialize $p, you will also see that the class name is lower case as well:
$p = new MyClass();
echo serialize($p);
Displays:
O:7:"myclass":1:{s:3:"val";i:100;}
In my case, this is an important point for mapping class names to database table names (and vice
versa).