StripNamespace::stripNamespace()

Not yet in a tagged release

Description

StripNamespace::stripNamespace() returns a class or object's class name, minus the namespace.

use GanbaroDigital\MissingBits\TypeInspectors\StripNamespace;
public string StripNamespace::stripNamespace(string|object $item);

Parameters

The input parameters are:

Return Value

StripNamespace::stripNamespace() returns a string. It contains the name of the class or object, without the namespace portion of the name.

Throws

StripNamespace::stripNamespace() throws these exceptions:

Works With

StripNamespace::stripNamespace() is supported on these versions of PHP:

PHP Version Works?
5.5 Yes
5.6 Yes
7.0 Yes
HHVM Yes