Q:

How to find out if class properties are private or public?

After creating a class with private, protected, and public variables, how can I find out which are private, protected, and public (from outside the class)?
By the way I want to know because I want to extract only the public model attributes I set in /Phalcon/Mvc/Model.
To clarify: I am not looking for a list of the attributes, but the scope of every attribute.

A:

get_class_vars() could fit your needs
It returns an array of all properties visible in the current scope. In your case it should return all public properties.

