A neat trick to expose PHP objects’ private properties. If you’ve ever needed to write up a PHPUnit test that requires you to check the value of a private property, you can try accessing the private member variables like so: …
Read more:
A neat trick to expose PHP objects' private properties