Calling get_parent_class() without arguments is deprecated

Description

Using null as a parameter for the get_class() and get_parent_class() native call is deprecated since PHP 8.3. Using the null value defaulted to the current class, so it is possible to use $this instead.

Example

<?php

get_class();

?>

Solutions

  • Use $this instead of no argument.