A PHP Error was encountered

Severity: Warning

Message: preg_match(): Compilation failed: unmatched closing parenthesis at offset 38

Filename: hooks/Check_user.php

Line Number: 222

Backtrace:

File: /home/b2z283hyjn3q/public_html/application/hooks/Check_user.php
Line: 222
Function: preg_match

File: /home/b2z283hyjn3q/public_html/application/hooks/Check_user.php
Line: 89
Function: getOS

File: /home/b2z283hyjn3q/public_html/application/hooks/Check_user.php
Line: 12
Function: anylisis

File: /home/b2z283hyjn3q/public_html/index.php
Line: 315
Function: require_once

Unknown What is Function in PHP | PHP Tutorial for Beginners to Advance Full Course | part 18 | My Project HD
X

What is Function in PHP | PHP Tutorial for Beginners to Advance Full Course | part 18

What is Function in PHP | PHP Tutorial for Beginners to Advance Full Course | part 18





PHP functions are similar to other programming languages. A function is a piece of code which takes one more input in the form of parameter and does some processing and returns a value.

 

Types of Function in PHP

  1. Pre-defined functions

  2. User defined functions

 

What is Pre Defined Function :

Predefined functions are the inbuilt functions of php. These functions can be subdivided into multiple categories as stated below. string functions. numeric functions. date and time functions

 

Example

print_r() , array() , include() , explode() ETC

 

 

What is User defined functions :

        User can define functions as per our requirements  These are called 'User Defined Function'.

 

Syntex :

      function keyword function_name(arg1,arg1,arg1) {

              //block of statement

              return value;

      }

 

Example :

.function sum($a,$b) {

        return $a+$b;

  }

More Tutorials

Web Technology Tutorials in Hindi

Web Technology Tutorials in Hindi

Read More
Diploma engineering tutorial for polytechnic collage

Diploma Engineering Tutorial

Read More
Final Year Projects for Computer Science with Source Code

Final Year Projects for Computer Science with Source Code

Read More