[go: up one dir, main page]

0% found this document useful (0 votes)
24 views5 pages

PHP Programming Assignment

Suhail Yousuf Kumar (Roll No 4216, Sem 4th) discusses function arguments in PHP and how they can be passed by value or by reference. Arguments are separated by commas when passed to a function. Call by value passes the value directly without affecting the original variable, while call by reference passes the address of the variable so any changes made inside the function do affect the original.

Uploaded by

STUCK OFF
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

PHP Programming Assignment

Suhail Yousuf Kumar (Roll No 4216, Sem 4th) discusses function arguments in PHP and how they can be passed by value or by reference. Arguments are separated by commas when passed to a function. Call by value passes the value directly without affecting the original variable, while call by reference passes the address of the variable so any changes made inside the function do affect the original.

Uploaded by

STUCK OFF
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

NAME SUHAIL YOUSUF KUMAR

ROLL NO 4216
SEM 4TH
FUNCTION ARGUMENTS

WITH CALL BY VALUE AND CALL BY REFERENCE


FUNCTION ARGUMENTS

• We can pass the infirmation in PHP function through Arguments which is


separated by comma .

• While calling a function The arguments can be passed to a function in two


ways , Call by value ans Call by referennce .
CALL BY VALUE

Call by value means passing the value directly to a function . The called function
uses the value in a local variable , any change to it do not affect the source
variable .
PHP allows you to call the function by value and reference both .
In case of PHP call by value ,actual value is not modified if it is not modified inside
the function .
CALL BY REFERENCE

• Call by reference means passing the adress of a variable where the actual
value is stored . The called function uses the value stored in the passed adress:
any changes to it do affect the source variable . Hence actual value is
modified inside the function .

You might also like