Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Model {
- public function foo() {
- $metaData = new ReflectionClass($this);
- $properties = $metaData->getProperties(ReflectionProperty::IS_PRIVATE);
- foreach ($properties as $property)
- {
- $property->setAccessible(true);
- print $property->getName() . " = ";
- print $property->getValue($metaData);
- print '<br/>';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement