A function is a part of program which contains set of statements that can perform a desired task. A function can be defined with the function keyword followed by the function name and an optional set of parameters enclosed in parentheses. A function definition may not occur before a function call. It can be anywhere in the script. Although function definitions can be nested, it is not encouraged as they can make the script complex. Syntax for defining a function is given below: 1 2 3 4 5 function function_name() { //Body of the function } The
The post How functions are defined in PHP? appeared first on Coding Security.
How functions are defined in PHP?
read more
Tidak ada komentar:
Posting Komentar