public class MyClass { }
In Java, we can get class name with String className = MyClass.class.getSimpleName();
String className = MyClass.class.getSimpleName();
How to do this
end(preg_split("#(\\\\|\\/)#", Class_Name::class))
Class_Name::class: return the class with the namespace. So after you only need to create an array, then get the last value of the array.
Class_Name::class