Advertisements
Advertisements
Question
Explain Function concepts in PHP.
Long Answer
Advertisements
Solution
In most the programming language, a block of segments in a program that performs specific operation tasks (Insert, Execute, Delete, Calculate, etc.). This segment is also known as Function. A Function is a type of subroutine or procedure in a program.
Function will be executed by a call to the Function and the Function returns any data type values or NULL value to called Function in the part of the respective program.
The Function can be divided into three types as follows:
- User-Defined Function:
User-Defined Function (UDF) in PHP gives a privilege to the user to write own specific operation inside of existing program module. Two important steps the Programmer has to create for users to define Functions are Function declaration and Function calling. - System Define Functions:
A function is already created by system it is a reusable piece or block of code that performs a specific action. Functions can either return values when called or can simply perform an operation without returning any value. - Parameterized Function:
PHP Parameterized functions are the functions with parameters or arguments.
shaalaa.com
Is there an error in this question or solution?
