Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
WEB DEVELOPMENT
PHP
PRESENTATORS
MD. AL-MAMUN SARKAR
FUNCTIONS
FUNCTIONS
Build in Functions1
User Defined Functions2
function
function functionName() {
code to be executed;
}
2
Function Arguments
function functionName(arg) {
code to be executed;
}
2
Function Arguments
function functionName(arg1, arg2, arg3) {
code to be executed;
}
2
Default Argument Value
function functionName(arg3 = 5) {
code to be executed;
}
2
Default Argument Value
function functionName(arg1, arg3 = 5) {
code to be executed;
}
2
Returning values
function functionName(arg1, arg2) {
code to be executed;
return arg1 + arg2;
}
QUESTION
?
THANK
YOU
Upcoming SlideShare
Loading in …5
×

PHP Lecture 3 - Functions

PHP Lecture 3 - Functions

  • Login to see the comments

  • Be the first to like this

PHP Lecture 3 - Functions

  1. 1. WEB DEVELOPMENT
  2. 2. PHP PRESENTATORS MD. AL-MAMUN SARKAR
  3. 3. FUNCTIONS
  4. 4. FUNCTIONS Build in Functions1 User Defined Functions2
  5. 5. function function functionName() { code to be executed; } 2
  6. 6. Function Arguments function functionName(arg) { code to be executed; } 2
  7. 7. Function Arguments function functionName(arg1, arg2, arg3) { code to be executed; } 2
  8. 8. Default Argument Value function functionName(arg3 = 5) { code to be executed; } 2
  9. 9. Default Argument Value function functionName(arg1, arg3 = 5) { code to be executed; } 2
  10. 10. Returning values function functionName(arg1, arg2) { code to be executed; return arg1 + arg2; }
  11. 11. QUESTION ?
  12. 12. THANK YOU

×