.. _structures-getclasswithoutarg: .. _get\_class()-without-argument: get_class() Without Argument ++++++++++++++++++++++++++++ `get_class() `_ and `get_parent_class() `_ should not be called without arguments. It was possible until PHP 8.3, but it is now a deprecated behavior. .. code-block:: php Suggestions ___________ * Use get_called_class() instead * Use __CLASS__ magic constant instead Specs _____ +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/GetClassWithoutArg | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`CompatibilityPHP83 ` | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.6.1 | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | With PHP 9.0 and older | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+