Hi Nikita and Stanislav,

>  > get_class(), get_parent_class() and get_called_class() without argument
> >
> > I'm not sure why. I mean if we want to make them return the same as
> > self::class etc. - up to the point of actually compiling them as such -
> > no problem, but I don't see why they need to be deprecated. And I
> > vaguely remember seeing get_class() at least a bunch of times in old
> > code, when ::class didn't even exist. I don't see a good reason why that
> > code should be broken.
> >
>
> I agree with you on this one. From my perspective, there should be some
> technical motivation for deprecations, and this one seems to be more about
> coding style -- it removes an old way to write something, which has been
> subsumed by a different construct in the meantime. I think Máté suggested
> this one, maybe he can provide additional reasoning.
>

The technical motivation why I suggested this idea is because the optional
parameter of get_class() and get_parent_class() doesn't have a correct
default value
since https://wiki.php.net/rfc/get_class_disallow_null_parameter. So I
don't really mind
the coding style perspective, I'd only like to ensure that default value
handling is
right without reverting the relevant RFC. If you think it's too much of a
BC break for a
small gain, then I'm ok to remove this item from the list.

Regards:
Máté

Reply via email to