Functions are a way to structure code that is used several times into a convenient structure. This is a great way to reduce code duplication and increase reusability. There are more than 1000 built-in functions in PHP and user-defined functions can be declared in the main script or in an include file, and it is up to the script developer to make sure the correct files are included before a function is called.
Recipe 11-1. Calling Functions
In chapter 2 we discussed the use of classes to build objects of data (member variables) and functionality (methods). Using a class to instantiate ...