i
PHP Variables
PHP Data Types
PHP Echo & Print
PHP Strings
PHP Numbers
PHP Constants
PHP Operators
PHP if...else...elseif Statements
Switch Statement
PHP Loops
PHP Arrays
Superglobals
PHP Coding Standards
PHP Form Handling
PHP Form Validation
PHP URLs Validation
PHP Form Required Validation
Complete Form Example
PHP File Functions Open/Read
PHP File Create/Write
PHP File Upload
PHP Cookies Handling
PHP Session Handling
PHP filter_var() Function
PHP Validation Filters
PHP Sanitization Filters
Using Filters
Filters Advanced
JSON
PHP Date and Time
MySQL Database
MySQL Connect
MySQL Commands-Creating a Table
MySQL Commands-Inserting The data
MySQL Commands-Prepared Statement
MySQL Commands-Selecting The Data
MySQL Commands-Where and Order By
MySQL Commands-Deleting And Updating The Data
PHP-OOP Introduction
PHP-Classes/Objects
PHP-Constructor/Destructor
PHP-Access Modifiers
PHP-Inheritance
PHP-Inheritance and Protected Access Modifier
PHP-Overriding Inherited Methods
PHP-Final keyword
PHP-Abstract Classes
PHP-Constants
PHP-Traits
PHP-Static Methods and Properties
Introduction to Functions
Defining A function
Returning Values From A Function
Dynamic Function Calls
Variable Scope
Understanding Arguments Or Parameters
Testing For A Function Existence
Returning Multiple Values From A Function
Making practical Use By Building Code Libraries For Code Re-usability
Using Include() And Require()
Functions in PHP are like other programming languages that take one or more parameters and perform a specific task. The block of code takes the information in the form of parameters to calculate or execute the set of statements and return a value.
Functions are really helpful and have a lot of advantages.
Functions are reusable components. When we want to use common code in various parts of the php script, we can write the set of statements in a function and call it whenever required.
Functions makes error detection easier. When we divide the code into smaller chunks into functions, we can easily identify which function is having error and fix the function with fewer efforts.
If you want to change or update some lines of code, we can change the statements in function, and whenever you call the function, the changes will reflect automatically.
There are two types of functions in PHP.
1. Built-in Functions – PHP has a huge collection of over 1000 built-in functions. These functions are coded and stored in the php library, and you can call these functions directly whenever required in the script. For e.g. print_r(), fopen(), var_dump, gettype() etc.
2. User-defined Functions – PHP also allows us to create customized functions as per the dynamic requirements apart from the built-in functions. We can create a block of code as per our project needs and use it by calling whenever required.
Don't miss out!