If you want to access a private variable/method outside the class... here is a trick to do the same: class A { private $notVisibleOutside = 1; } $a = new ReflectionClass("A"); $property = $class->getProperty("notVisibleOutside "); $property->setAccessible(true); $a1 = new A(); echo $property->getValue($a1); // Work So, the basic idea is to - create a reflection class in php - make the property or method accessible - use that property to access the private variables/methods
The blog will contain all the Technical knowledge I have to share and I welcome & would appreciate others for sharing their knowledge :0)