The Little Guy Posted January 9, 2010 Share Posted January 9, 2010 I am trying to read the properties of a class, but I keep getting an empty array.. print_r(get_object_vars(new MyClass())); In my class all the vars are set to protected, but I would like to get them. If I change them to public then it reads them fine. How can I get all the properties in a class? Link to comment https://forums.phpfreaks.com/topic/187810-get-properties-in-a-class/ Share on other sites More sharing options...
The Little Guy Posted January 9, 2010 Author Share Posted January 9, 2010 Never mind, I found a different way I want to approach my problem. Link to comment https://forums.phpfreaks.com/topic/187810-get-properties-in-a-class/#findComment-991606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.