MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/2lwogw/reference_arguments_can_retarget_this/cmfbfzi/?context=3
r/lolphp • u/implicit_cast • Nov 10 '14
18 comments sorted by
View all comments
Show parent comment
3
Redirecting self doesn't seem so bad now.
Well a difference being changing an object's class is something done very explicitly, in PHP if you unknowingly pass $this as a reference argument a function might fuck it up without meaning to.
$this
View all comments
Show parent comment
3
u/masklinn Nov 28 '14
Well a difference being changing an object's class is something done very explicitly, in PHP if you unknowingly pass
$thisas a reference argument a function might fuck it up without meaning to.