Is it possible to create packages of related classes and have the same protected and private fields which are visible only to classes from within the same package?
Basically, the same type of packages as what Java has. Is it possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Right now, there is no concept of package.
However, PHP 5.3 is going to introduce namespaces. I’m not sure about how that will affect visibility between classes.