It might be better to wrap this in an isset()
if(isset($A->b->c)) { // c exists
That way if $A
or $A->b
don’t exist… it doesn’t blow up.
It might be better to wrap this in an isset()
if(isset($A->b->c)) { // c exists
That way if $A
or $A->b
don’t exist… it doesn’t blow up.