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?
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.
Nope. PHP has no package or friend-class support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With