Is there a simple way to get the class name without the namespace without using Reflection?
This is my class and when I call get_class() I get CRMPiccoBundle\Services\RFC\Webhook\SiteCancelled
namespace CRMPiccoBundle\Services\RFC\Webhook;
class SiteCancelled extends Base implements Interface
{
public function process() {
// echo get_class()
}
}
\and take everything after it… php.net/manual/en/ref.strings.phpstr_replacebut I full expected PHP to offer a cleaner way of doing that rather than having to rely on string manipulation.