Chapter 36 User-Defined Subprograms
36.1 Subprograms that Return a Value
In PHP and many other computer languages, a subprogram that returns a value is called a function. Τhere are two categories of functions in PHP. There are the built-in functions, such as abs(), sqrt(), and there are the user-defined functions, those that you can personally write and use in your own programs.
The general form of a PHP function that returns a value is shown here.
where
Get PHP and Algorithmic Thinking for the Complete Beginner now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.