Classes

Classes

The object has its own properties and can do with it different things. Class is not an object, but its definition (eg. The class is a dog, but not the specific copy). The class definition contains variables (object properties) and function (what you can do with these objects). By using such a convention programming time can be easier to describe the interactions between objects. Here's how to define a sample class and examples of actions on it. Example <?php // Start the class definition Basket - defining basket shop class Cart

Functions

Functions

The function is a piece of code that can be called using the name. We have already been given several functions provided by PHP, such as array (), each (), list (), explode () and implode (). Features recognized by the parentheses occurring after their name. In these brackets (if required) is given parameters for the function. Some functions

(więcej…)

Close Menu