Search Results

  1. Preface Function Reference Variable and Type Related Extensions Reflection ReflectionClass Change language:

    • getMethod

      ReflectionClass::getMethod (PHP 5, PHP 7, PHP 8)...

    • getProperties

      Changelog ¶ ... Examples ¶ Example #1...

    • getProperty

      Gets a ReflectionProperty for a class's property Accessing...

    • hasMethod

      ReflectionClass::hasMethod (PHP 5 >= 5.1.2, PHP 7, PHP 8)...

    • getDocComment

      Note that \ReflectionClass::getDocComment() ignores all...

    • isSubclassOf

      See Also ¶ ReflectionClass::isInterface () - Checks if the...

    • getConstants

      Parameters ¶ filter The optional filter, for filtering...

    • getMethods

      Note, for ReflectionClass::getMethods() not all methods in a...

  2. Aug 21, 2025 · The getShortName() function is a method of the ReflectionClass class. Its primary purpose is to return the short name of a class, which is essentially the class name without its namespace.

  3. PHP Manual Gets the short name of the class, the part without the namespace.

  4. Sep 7, 2025 · ReflectionClass::getShortName (PHP 5 >= 5.3.0, PHP 7, PHP 8) ReflectionClass::getShortName — Gets short name

  5. The above example will output: bool (false) string (8) "stdClass" string (0) "" string (8) "stdClass" bool (true) string (7) "A\B\Foo" string (3) "A\B" string (3) "Foo"

  6. Nov 11, 2013 · Specifically, you can use the ReflectionClass::getShortName method, which gets the name of the class without its namespace. First, you need to build a ReflectionClass instance, and then call the getShortName method of that instance:

  7. People also ask

  8. Gets the short name of the class, the part without the namespace.

  1. People also search for