Tagchild

Late Static Binding namespace resolution in PHP

If you try to get the namespace of the child class that you are in using the __NAMESPACE__ keyword, you will have the same problem that you do using functions like get_class() in that you will get the namespace (or class) where the current method you are calling is defined. $namespace = __NAMESPACE__; $class = get_class(); You can use get_called_class() to resolve this for Late Static Binding...