I have a class that extends another.
when I repeat the current object, I get all the properties, even those from the superclass.
I only want to iterate over the current object. How can i do this?
foreach($this as $key => $value) {
echo $key . ': ' . $value;
}
source
share