Properties
- Define class properties (variables) inside the class using visibility keywords (
public
,protected
, orprivate
). - Properties store object data and represent the state of the object.
How to Define a Class in PHP?
To declare a class in PHP, we use the keyword class followed by the class name. Class names should follow the CamelCase convention and start with an uppercase letter.