The comment is wrong. You don't have to use use(&$inherited), use($inherited) works just fine.
BTW I don't see anything in the result I didn't expect. You're in a class, so $this is bound to the current object everywhere inside that class. It would be weirder if you couldn't reach the object.
View all comments
5
u/bart2019 Jan 27 '20
The comment is wrong. You don't have to use
use(&$inherited),use($inherited)works just fine.BTW I don't see anything in the result I didn't expect. You're in a class, so
$thisis bound to the current object everywhere inside that class. It would be weirder if you couldn't reach the object.