public static function fetchProperty($object, $property)
    {
        $refl = new \ReflectionObject($object);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue($object);
    }
public static function fetchProperty($object, $property)
    {
        $refl = new \ReflectionObject($object);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue($object);
    }
public static function fetchProperty ( $ object , $ property ) { $ refl = new \ ReflectionObject ( $ object ) ; $ prop = $ refl -> getProperty ( $ property ) ; $ prop -> setAccessible ( true ) ; return $ prop -> getValue ( $ object ) ; }
Fetch a property of an object, bypassing visibility restrictions.

@param object $object
@param string $property property name

@return mixed Value of $object->property
Fetch a property of an object bypassing visibility restrictions .