03MAY
03MAY
Note:
You should read and understand the content and then rewrite it. Do this
rewriting in the same document with track changes on.
No similarity should be found. The representation of content should also be
different from the original.
Ensure that the document you send is plagiarism-free. So, rewrite such that
no three consecutive words in a sentence match with the original.
----------------------------------------------------------
PHP Functions
PHP function is a piece of code that can be reused many times. It can take input as argument list
and return value. There are thousands of built-in functions in PHP.
In php function is a block of statements that can be repeatedly used/executed in a code to perform
specific action.
It takes one or more inputs as a parameter and processes it and returns a value.
It takes one or more inputs as a parameter/argument list, processes it and returns a value.
Built in Functions:
PHP has over thousands of built-in functions that perform different tasks.
PHP comes standard with huge collection of built-in functions. To use these functions .You can call
these functions, from within a script, to execute or repeat specific tasks. Some of the examples are
exit()
file_get_contents()
file_put_contents()
include()
preg_match()
print_r()
rand()
str_replace()
str_len()
huge collection of built-in library functions. These functions are already coded and stored
in form of functions. To use those we just need to call them as per our requirement like,
var_dump, fopen(), print_r(), gettype() and so on.
Documentation of function
IN PHP, many functions are used such as built-in functions and user-defined functions. Each
and every function has its own functionality and properties. A
It takes input from the user in the form of parameters, performs certain actions, and gives the
output. Functions can either return values when called or can simply perform an operation
without returning any value.
Code Reusability: PHP functions are defined only once and can be invoked many times, like in other
programming languages.
Less Code: It saves a lot of code because you don't need to write the logic many times. By the use
of function, you can write the logic only once and reuse it.
Easy to understand: PHP functions separate the programming logic. So it is easier to understand
the flow of the application because every logic is divided in the form of functions.
PHP comes standard with many built-in functions. They give us an easier way to implement and
repeat popular tasks throughout a program. A popular example is the echo function.
PHP comes with a number of built-in functions. These functions—also known as internal functions
— can be invoked without writing them ourselves. In this lesson, we’ll explore some useful built-in
functions and empower you to discover new built-in functions yourself.
PHP includes useful built-in functions for getting information about
variables. The gettype() function takes a variable as its argument and returns a string value
representing the data type of the argument.
$name = "Aisle Nevertell";
$age = 1000000;
Test 3: Write a procedure explaining adding index entries (main index and sub
index) in word.