© Andrew Beak 2017
Andrew BeakPHP 7 Zend Certification Study Guidehttps://doi.org/10.1007/978-1-4842-3246-0_2

2. Functions

Andrew Beak1 
(1)
Grafham, Cambridgeshire, UK
 
Functions are packages of code that can be used to execute a sequence of instructions. Any valid code can be used inside a function, including calls to other functions and classes.
In PHP, function names are case insensitive and can be referenced before they are defined, unless they are defined in a conditional code block. Functions can be built-in, provided by an extension, or user-defined. Functions are distinct from language constructs.

Arguments

Arguments to a function, also known as parameters, allow you to pass values into the function scope. Arguments are passed as ...

Get PHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP Exam 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.