PHP Functions

What is a function?

  • ™A function is a named block of code that defines a particular algorithm  to solve  a certain problem.
  • ™A function can take extra information in order to solve a given problem. ™A function can give back a result  after performing its task.
  • ™A function can be recursive (a function that calls itself until a certain condition )

Function Model

Types of functions

™There are two types of functions in PHP:

  • –Built-In functions: ™A function that is already defined in PHP framework
  • –User-defined functions: ™A function that is defined by a user who uses PHP framework.

Leave a Comment

Your email address will not be published. Required fields are marked *