jeudi 20 juillet 2017

php, how to get all private variables EXCEPT inherited ones?

Class A
{
    Private $a;
}

Class B extends A
{
    Private $b;

    Public function list()
    {
        Var_dump($this);
    }

(New B())->list()

It will print even variables from A. I want to get variables only from B. How to do it?





Aucun commentaire:

Enregistrer un commentaire