PHP Functions

Functions are used to re use the code by call using function name
PHP supports two types of functions

1. User Defined Functions

These functions are defined by the user the scope of these functions is inside the application or project user can defined the function in two types
Absolute Functions
Normal or Concrete Functions

Abstract Functions: If any Functions having any definition without body is called abstract Functions
Syntax: Function Function Name();

Concrete Functions: If any Functions having both definition and implementation is called concrete Functions

Syntax: Function Function Name() {
                Statements;
}

Types of User Defined Functions
a) Functions with Arguments
b) Functions with Retune
c) Functions with Arguments and Retune

2. Pre Defined Functions


These functions is defined in PHP libraries we have mainly seven types of pre defined functions in PHP
1.       String Functions
2.       Array Functions
3.       Math Functions
4.       Date Function
5.       Directories Function
6.       File Functions
7.       Data Base Functions

No comments:

Post a Comment