0
It is possible to obtain only the name of the protected properties of an object without the asterisk symbol (*).
class Person {
protected $name;
protected $age;
}
$person = new Person();
print_r(array_keys((array) $person)); //Array ( [0] => *name [1] => *age )
The goal would be Array ( [0] => name [1] => age )
.
Is there a PHP function for this?
Thank you, excellent reply!
– Victor Carnaval