LonghornPHP 2026

Voting

: min(seven, four)?
(Example: nine)

The Note You're Voting On

emmanuel dot antico at gmail dot com
13 years ago
/**
 * 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;
}

<< Back to user notes page

To Top