Home
PHP
Chart
Class
Components
Cookie Session
Data Structure
Data Type
Date
Design Patterns
Development
DNS
Email
File Directory
Form
Functions
Graphics Image
HTML
Language Basics
Login Authentication
Math
MySQL Database
Network
Operator
PDF
Reflection
Statement
String
Utility Function
Web Services SOAP WSDL
XML
private « Class « PHP
PHP
Class
private
1.
class member variable access: private
2.
Access private properties with for each loop
3.
Changing the member $a to protected or private
4.
Using private and public in Classes
5.
If the variable was defined as private static, it would not be possible to access it directly
6.
Private and inheritance
7.
Private properties are accessible only inside the methods of the class that defined them
8.
Protect the class from being misused by accessing the members directly