I am learning about Magic Methods in OOP, after searching Stackoverflow, php.net and all over Google I've found that the explanation on the similarity of these two methods are a bit vague.
The biggest question is regarding __isset, because __get in itself is quite straightforward.
I understand __get() as: "__get() is utilized for reading data from inaccessible properties."
Which works in the below method and when calling a non-existent property it explains clearly what it does.
public function __get($propertyName) {
echo "<hr>attempted to read non-existing property: $propertyName<hr>";
}
But then what about __isset()? If you already have a __get() magic method in place, would there still be a use for __isset()?
While writing this, I'm thinking that I could implement __isset() in a class if I'm gathering data from $_POST just like how I'd use isset() outside a class. Would that be the difference?
I have checked What is the difference between isset() and __isset()? and unfortunately that doesn't seem to answer my question.