public : This is the default and undeclared value
private: Can be accessed in the class itself.
protected : can be accessed in the child class
static : variable can be used using :: operator , no class instantiation is required for functions., eg User: : $name;
abstract: These classes can not be used as such but need to be extened.
final : stops further modification.
iterateObject : This method let iterate instances of all objects.
Online Playgrounds for php