Variables are born, they live their lives, and then they die. But beware! (Cue spoopy theme music.) Zombie variables lurk in the simplest of PHP.
Showing posts with label Hack. Show all posts
Showing posts with label Hack. Show all posts
Tuesday, October 30, 2018
Friday, November 11, 2016
Bypassing private and protected visibility in PHP
Members declared protected can be accessed only within the class itself and by inherited classes. Members declared as private may only be accessed by the class that defines the member.
This is true only in an academic sense: code outside the object can still get and set private and protected members. As usual in PHP, all it takes is a little magic.
