note 112159 added to function.get-class
| From: | emmanuel dot antico at gmail dot com | Date: | Fri, 10 May 2013 19:35:53 +0000 |
| Subject: | note 112159 added to function.get-class | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194779@lists.php.net to get a copy of this message | ||
/**
* Obtains an object class name without namespaces
*/
function get_real_class($obj) {
$classname = get_class($obj);
if (preg_match('@\\\\([\w]+)$@', $classname, $matches)) {
$classname = $matches[1];
}
return $classname;
}
----
Server IP: 69.147.83.199
Probable Submitter: 190.6.213.114
----
Manual Page -- http://php.net/manual/en/function.get-class.php
Edit -- https://master.php.net/note/edit/112159
Del: integrated -- https://master.php.net/note/delete/112159/integrated
Del: useless -- https://master.php.net/note/delete/112159/useless
Del: bad code -- https://master.php.net/note/delete/112159/bad+code
Del: spam -- https://master.php.net/note/delete/112159/spam
Del: non-english -- https://master.php.net/note/delete/112159/non-english
Del: in docs -- https://master.php.net/note/delete/112159/in+docs
Del: other reasons-- https://master.php.net/note/delete/112159
Reject -- https://master.php.net/note/reject/112159
Search -- https://master.php.net/manage/user-notes.php